Hi,
I am new to C programming. I am trying to write an integer into a file using built-in fwrite function in C. After writing the integer into file it becomes unreadable(^@^@.. characters). Can you please let me know how to write an integer into a file so that it is readable ?. I am using the following code.
Regards,Code:void main(){ int a = 10; int *p = &a; FILE *fp = fopen("Ascii.txt", "w"); fwrite(p,sizeof(int),1,fp); fclose(fp); }
Srikkanth