Answers for "How to take string array input in C"

C
0

create array of strings in c from user input

#include <stdio.h>

int main()
{
   char str[5][10];

   printf("enter the strings...\n");
   for(int i =0; i < 5; i++)
   scanf("%s", str[i]);

   printf("All strings are...\n");
   for(int j =0; j < 5; j++)
   printf("%s\n", str[j]);
}
Posted by: Guest on April-29-2021

Code answers related to "How to take string array input in C"

Code answers related to "C"

Browse Popular Code Answers by Language