Computer Science, asked by ramsmedicine, 9 hours ago

assign names of your five friends to five different variables. Write a program tp print your friends name in different lines


pls answer to my question I will mark u as brainly list

Answers

Answered by kimtaehyung75
4

int main(void)

{

char cName[5][21]= {0};

int x=0;

int iPick;

printf("Enter the name of 5 people\n\n");

for(x=0;x<=5;x++){

printf("Enter name %d:", x+1);

scanf("%s", cName[x]);

printf("\n\nWould you like to add another name or view current names stored?\n");

printf("1)\tAdd another name\n");

printf("2)\tView names stored\n");

scanf("%d", &iPick);

switch(iPick){

case 1:

break;

case 2:

for(x=0;x<=5;x++){

printf("\nName %d is %s\n",x+1, cName[x]);

}

}

}

return 0;

}

Answered by Anonymous
0

Answer:

Answer:

a = "Piyush"

b = "Monu"

c = "Himanshu"

d = "Raj"

e = "Nikita"

print (a)

print (b)

print (c)

print (d)

print (e)

Similar questions