Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #pragma warning(disable : 4996)
- void main()
- {
- FILE *fp;
- // Opening a file for writing
- fp = fopen("data.txt", "w");
- // fprintf work almost exactly like printf
- // except the fist parameter is a FILE*
- fprintf(fp, "%s", "Blue Ballington\n");
- fprintf(fp, "%c\n", 'n');
- fprintf(fp, "%d\n", 21);
- fclose(fp);
- }
Advertisement
Add Comment
Please, Sign In to add comment