To get String from Console
char *gets(char *str)
#include int main() { char str[50]; printf("Enter a string : "); gets(str); printf("You entered: %s", str); return(0); }
output
reference