Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~257 People Reached
Favorite Forums
Favorite Tags
c x 3
Member Avatar for axn

How do I read and print just n(10) lines in a file and not whole file. [CODE]#include<stdio.h> #include<string.h> int main() { char line[50]; FILE *datafile; datafile = fopen("/data3", "r"); while(fgets(line,sizeof line,datafile)!=NULL) printf(" %s\n", line); fclose(datafile); return 0; }[/CODE]

Member Avatar for Narue
0
159
Member Avatar for MatGreenfield

Hi, I am writing a piece of code that takes copies the contents of one file to another (which is created by the code, the name is given by user as an arguement). I've managed to successfully open and read in the source file, and the program will create the …

Member Avatar for MatGreenfield
0
98