As i know, i can create an array with item inside such as:
char *test1[3]= {\"arrtest\",\"ao\", \"123\"};
but how can i store my input into arr
This code inspired me on how to get my user input strings into an array. I'm new to C and to this board, my apologies if I'm not following some rules on how to post a comment. I'm trying to figure things out.
#include
int main()
{
char strings[3][256];
scanf("%s %s %s", strings[0], strings[1], strings[2]);
printf("%s\n%s\n%s\n", strings[0], strings[1], strings[2]);
}