C examples for stdio.h:gets
function
<cstdio> <stdio.h>
Get string from stdin
char * gets ( char * str );
Parameter | Description |
---|---|
str | Pointer to a block of memory (array of char). |
On success, the function returns str.
#include <stdio.h> int main()//from w ww . j a v a 2s . c o m { char string [256]; printf ("Insert your full address: "); gets_s(string); printf ("Your address is: %s\n",string); return 0; }