Question #3338

Write a program to take a string as input from the key board using gets() function display it on the screen.

Expert's answer

#include <cstdio>

int main()
{
char string[100];
printf ("Please input a string:\n");
gets (string);
printf ("You string is %s\n", string);

return 0;
}
LATEST TUTORIALS
APPROVED BY CLIENTS