You are here : Cstdio.hgets

gets() - stdio.h

To get String from Console


Syntax

char *gets(char *str)


Example

#include <stdio.h>

int main()
{
   char str[50];

   printf("Enter a string : ");
   gets(str);

   printf("You entered: %s", str);

   return(0);
}


Output / Return Value

output


Limitations


Alternatives / See Also


Reference

reference