Untitled
unknown
plain_text
2 years ago
417 B
10
Indexable
#include <stdio.h>
#include <stdlib.h>
void main()
{
FILE *fptr;
char ch[200];
fptr=fopen("C:\Sudip_Dahal_File_Handling2","w");
if(fptr==NULL){
printf("File not opened !!!");
exit(0);
}
else {
printf("File opened successfully.");
}
//fputs("Hello!Sudip_Dahal",fptr);
fgets(ch,2,fptr);
printf("\nContent in the file is : %s",ch);
fclose(fptr);
}
Editor is loading...
Leave a Comment