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

Question

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

in progress 0
Ayla 2 years 2021-06-24T13:09:37+00:00 2 Answers 0 views 0

Answers ( )

    0
    2021-06-24T13:10:58+00:00

    Answer:

    Answer:

    a = “Piyush”

    b = “Monu”

    c = “Himanshu”

    d = “Raj”

    e = “Nikita”

    print (a)

    print (b)

    print (c)

    print (d)

    print (e)

    0
    2021-06-24T13:11:17+00:00

    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;

    }

Leave an answer

Browse

9:3-3+1x3-4:2 = ? ( )