Can anyone please explain this below steps in this program
0 Answers
Can anyone please explain this below steps in this program
| Flag | PURGE
#include <stdio.h>
#include <stdlib.h>
int main()
{
char fname[20][10],sname[20][10],surname[20][10];
char name[20][20],mobile[20][10],temp[20];
int i,j;
printf("Enter Names and Mobile Numbers:\n");
for(i=0;i<5;i++)
{
scanf("%s %s %s%s",fname[i],sname[i],surname[i],mobile[i]);
strcpy(name[i],surname[i]);
strcat(name[i],","); ( I am confused from this step onwards)
temp[0]=fname[i];
temp[1]='\0';
strcat(name[i],temp);
strcat(name[i],".");
temp[0]=sname[i][10];
temp[1]='\0';
strcat(name[i],temp);
}
}
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.