Why the the gets statement doesn't work? Even if i change it with fgets( pet, sizeof( pet ), stdin ); it still doesn't work.Code:#include <stdio.h> int main() { char name[10], pet[20]; scanf( "%s", name ); printf( "Hello %s!\n", name ); gets( pet ); puts( pet ); return 0; }
It's so strange...
Thanks in advance