WAP to enter two strings and get them to display.

#include <stdio.h>int main(){char S1[20];char S2[20];//the datatype string doesn't exist in C.//method 1: can only take one word at a time (till spaces).printf("\n Enter the first string: ");
scanf(" %s ", S1);//method 2: can take whole line including spaces.printf(" Enter the second string: ");
gets(S2);printf("\n The Strings are:\n 1st: %s\n 2nd: ",S1);
puts(S2);return0;}

OUTPUT:

Enter the first string: Hello
Enter the second string: World
The Strings are:
1st: Hello
2nd: World

Enter the first string: New York
Enter the second string:
The Strings are:
1st: New
2nd: York

Enter the first string: New York er
Enter the second string:
The Strings are:
1st: New
2nd: York er