Answers for "how to make array of string usng c"

C
1

c array of strings

char commands[][4] = {
        "add",
        "prn",
        "lea",
        "inc",
        "mov"
};
Posted by: Guest on January-07-2022
1

string array in c

char ch_arr[3][10] = {
                         "spike",
                         "tom",
                         "jerry"
                     };
Posted by: Guest on November-16-2021
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("%sn", str[j]);
}
Posted by: Guest on April-29-2021

Code answers related to "C"

Browse Popular Code Answers by Language