I am writing a very simple code where the input will be like:
- First line will have number of strings user will enter. Eg:2
Print the string
char str[20]; int TC=0; scanf("%d",&TC); //get number of strings while(TC!=0){ //read all the strings and print fgets(str,19,stdin); printf("%s\n",str); TC--; }
The code takes N-1 input strings from user rather than N.