Joined
Last Seen
0 Reputation Points
100% Quality Score
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
0 Endorsements
Ranked #72.7K
Hello, I'm writing the simple code as below #include <stdio.h> #include <stdlib.h> int main() { FILE *fp; float x,y; int n; int errno = 0; int i; fp=fopen("test_numbers.dat","w"); for(i=1;i<=10;i++) fprintf(fp,"%d %d\n",i,i*i); fclose(fp); fp=fopen("./test_numbers.dat","r"); if(fp==NULL); printf("File cannot be opened\n"); fclose(fp); return 0; } and save it as main.c I'm compiling the … |