Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
1 Commented Post
0 Endorsements
Ranked #107.73K
~114 People Reached
Favorite Forums
Favorite Tags
c x 1

1 Posted Topic

Member Avatar for Hawking

[code=c]#include<stdio.h> int main(void) { FILE *fp = fopen("test.txt","r"); char c; int lines,numbers,others,temp; lines=numbers=others=0; while((c=getc(fp))!=EOF) { temp=c; if(temp>=48 && temp<=57) numbers++; else if(c=='\n') lines++; else others++; } printf("The total number of chars : %d\nThe total number of lines : %d\nThe total number of digits : %d\nThe total number of other characters: …

Member Avatar for kiran002
-3
114

The End.