Code Snippets C

#include
int main(void)
{
char str[100];
printf("Enter a string: ");
if(gets(str)) /* if not null */
printf("this is your string: %s", str);
return 0;
}