You are here : cpp0gets

gets() - 0

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