Mega Code Archive

 
Categories / C / Code Snippets
 

Get a string from stdin how to use gets

#include <stdio.h> int main() { char string [256]; printf ("Enter your string: "); gets (string); printf ("Your string is: %s\n",string); return 0; }