String Array (in C) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

String Array (in C)

How does one make a code that allows an user to enter multiple strings into an array such that the output is: "string1 string2 string3 string4"

30th May 2020, 7:28 AM
Russ
2 Answers
+ 4
#include <stdio.h> int main() { char name[30]; fgets(name, sizeof(name), stdin); // read string puts(name); return 0; }
30th May 2020, 9:15 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
30th May 2020, 7:41 AM
Namit Jain
Namit Jain - avatar