Display Message in a file C program

/*Display Message*/
#include<stdio.h>
#include<conio.h>
main()
{
char str[30]="Hello World";
FILE *p;
p=fopen("a.txt","w");
fprintf(p,"%s",str);
fclose(p);
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Enter Captcha Here : *

Reload Image