#include
#include
int main(void)
{
char str[10];
int j;
printf("Enter a string: ");
fgets(str, 10, stdin);
/* remove newline, if present */
j = strlen(str) - 1;
if(str[j] =='\n')
str[j] = '\0';
printf("This is your string: %s", str);
return 0;
}