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
~112 People Reached
Favorite Forums
Favorite Tags
c x 2
Member Avatar for Akhilesh_2

#include<stdio.h> #include<stdlib.h> #include<string.h> static int compare(const void *x,const void *y){ return strcmp(*(const char**)x, *(const char**)y); } int main(){ FILE *p = fopen("file.txt","w"); char ch = '\0',**c = (char**)calloc(6,sizeof(char*)); int n[6]={0},i=0,j=0; fprintf(p,"jack\nakki\njohn\nrachael\nrobin\ntom"); fclose(p); p = fopen("file.txt","r"); while(1){ while((ch=getc(p))!= '\n'){ if(ch == EOF) break; putchar(ch); n[i]++; } printf(" %d\n",n[i]); if(ch == EOF) …

Member Avatar for Akhilesh_2
0
112