PART - 86 file handling using fprintf and fscanf ( FILE HANDLING - 5 ) (Learn C by simple Example )

preview_player
Показать описание
File handling using fprintf and fscanf in C in Hindi

Code :

#include<stdio.h>
#include<conio.h>
main(){
FILE *f1;
char name[40];
int rn;
clrscr();

fprintf(f1, "%s :: %d", "Nishant", 40);
fprintf(f1, "%s :: %d", "Ritesh", 34);
fclose(f1);

while(!feof(f1)){
fscanf(f1, "%s :: %d", name, &rn);
printf("Name is %s\n", name);
printf("RN is %d\n", rn);
}
fclose(f1);
getch();
return 0;
}

follow us on :

Рекомендации по теме
join shbcf.ru