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
~682 People Reached
Favorite Forums
Favorite Tags
c x 8
Member Avatar for anirudhruia

[CODE]#include<stdio.h> int main() { char *arg[10],*c; int count=0; FILE *fp,*fq; printf("Name of the file:"); scanf("%s",arg[1]); fp=fopen(arg[1],"w"); printf("\t\t%s",arg[1]); printf("Input the text into the file\n"); printf("Press Ctrl+d to the stop\n"); while((*c=getchar())!=EOF) { fwrite(c,sizeof(char),1,fp); count++; } return 0; } [/CODE]

Member Avatar for untio
0
131
Member Avatar for anirudhruia

for(j=0;j<3;j++) { repeat:if((int*)ch[j][l]>(int*)ch[j+1][l]) { strcpy(tmp,ch[j]); strcpy(ch[j],ch[j+1]); strcpy(ch[j+1],tmp); } else if((int*)ch[j][l]==(int*)ch[j+1][l]) { l++; } goto repeat; } for(i=0;i<3;i++) { printf("%s",ch[i]); } return 0; NOt gettin any output

Member Avatar for navedalam
0
121
Member Avatar for anirudhruia

[CODE]#include<stdio.h> #include<string.h>\ struct name { char contact[20]; long int no; }; int main() { int i,check; char ch[20]; struct name cse2[10],*p; p=&cse2[10]; for(i=0;i<10;i++) { printf("Please enter contact name: "); scanf("%s",&(p+i)->contact[20]); printf("mobile no: "); scanf("%ld",&(p+i)->no); } printf("Please enter a contact name to find his\\her mobile no: "); gets(ch); for(i=0;i<10;i++) { check=strcmp(ch,(p+i)->contact[20]); …

Member Avatar for Moschops
0
81
Member Avatar for anirudhruia

[code] #include<stdio.h> int main() { int n,i,j; char p[10][10]; printf("please enter 10 words"); for(i=0;i<10;i++) { for(j=0;j<10;j++) { gets(p[i][j]) ; } printf("\n"); } for(i=0;i<10;i++) { for(j=0;j<10;j++) { printf("%c",p[i][j]); } printf("\n"); } return 0;} [/code] I actualy want to read 10 string from keyboard and print them but not gettin the output …

Member Avatar for vinayakgarg
0
96
Member Avatar for anirudhruia

How to access structure variables in nested structures [CODE]#include<stdio.h> typedef struct contact { char name[1][20]; struct number { double num; }no; }; [/CODE] Now how to access num ,can anyboddy explain me?

Member Avatar for anirudhruia
0
93
Member Avatar for anirudhruia

[CODE]#include<stdio.h> void string_copy(char str1[],char str2[]); int main() { int i; char str1[10],str2[10]; printf("please enter a name(string 1):"); gets(str1); printf("please enter a name(string 2):"); gets(str2); string_copy(str1,str2); printf("string 2 copied to string 1"); for(i=0;i<10;i++) { printf("%c",str1[i]); } return 0; } void string_copy(char *p1,char *p2) { int i; while((*p2)!='\0') { for(i=0;i<10;i++) { *(p1)=*(p2); …

Member Avatar for WaltP
0
160