P166. WAP to scan 5 strings and print it on the screen.

 

#include<stdio.h>

void main()

{

        char c[5][10];

        int i,ele;

        ele=sizeof(c)/sizeof(c[0]);

 

        printf("Enter the strings \n");

        for(i=0;i<ele;i++)

                scanf("%s",c[i]);

        for(i=0;i<ele;i++)

                printf("%s\n",c[i]);

}

Comments