Horje
string array input in c Code Example
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]);
}
string array input in c
#include <stdio.h>
int main() {
    int i;
    char *word[3];
    for(i=0;i<3;i++)
    {
        printf(" Enter a word: ");
        scanf("%s", &word[i]);
    }
    printf("%s ", word[0]);
    return 0;
}




C

Related
synopsis of fork() Code Example synopsis of fork() Code Example
phpunit assert continue Code Example phpunit assert continue Code Example
socket only connection Code Example socket only connection Code Example
#pragma pack(1) in c Code Example #pragma pack(1) in c Code Example
google cloud open port Code Example google cloud open port Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8