Mega Code Archive
Categories
/
C
/
Console
Get string from console and output it
#include
int main(void) { char str[80]; printf("Enter a string: "); if(gets(str)) /* if not null */ printf("Here is your string: %s", str); return 0; }