C Tutorials

int Data Types and scanf Statement in C 0

int Data Types and scanf Statement in C

Program 1 #include<stdio.h> #include<conio.h> int main() { int a=10,b=5,c; printf(“Enter two number”); scanf(“%d%d”,&a,&b); //scanf(“%d”,&a); // scanf(“%d”,&b); c=a+b; printf(“\nAddition of %d and %d is %d”,a,b,c); c=a-b; printf(“\nSub of %d and %d is %d”,a,b,c); c=a*b; printf(“\nMultiplication...

Difference Between scanf() and fscanf() in C 0

Difference Between scanf() and fscanf() in C

Program 1 // Program for scanf and fscanf #include<stdio.h> #include<conio.h> #include<string.h> #define clrscr() system(“cls”) int main() { int rno; char name[50]; float per; FILE *fp=NULL; fp=fopen(“c://mycfile/student.txt”,”w”); clrscr(); if(fp==NULL) printf(“File not created…..”); else { printf(“Enter...

realloc() Function in C 0

realloc() Function in C

Program 1 //Program for realloc function #include<stdio.h> #include<conio.h> #include <stdlib.h> #define clrscr() system(“cls”) int main() { int *ptr=NULL; ptr=(int *)malloc(2*sizeof(int)); // clrscr(); if(ptr==NULL) { printf(“Memory not allocated”); //exit(0); } else { printf(“Enter two Number”);...

C Project – ATM Bank Management System with Source Code 0

C Project – ATM Bank Management System with Source Code

Program 1 #include<stdio.h> #include<conio.h> #include<stdlib.h> #include<string.h> #define clrscr() system(“cls”) struct ATM { int acno; char name[50]; int amount; };struct ATM A1[5]; void design(); void createacc(); void deposit(); void withd(); void balance(); void displayAccount(); int...