C Tutorials

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...

c program to find length of string 0

C Program to Find Length of String

Determining the length of a string is a common task in programming. It allows us to perform operations on strings of text in an abstract way without needing to know the exact contents. Strings...

pointer with array in c 0

Pointers to an Array in C

In the realm of C programming, understanding the dynamics of pointers and arrays is akin to wielding the master key to the language’s power. Among the most potent tools at your disposal are pointers...