Write a program in C to input a string and print it.
#include <stdio.h>
int main()
{
char array[100];
printf("Enter a string\n");
scanf("%s", array);
printf("Your string: %s\n", array);
return 0;
}
Output
Enter a string
Hello World!
Your string: Hello