and for name, and other information where there will be spaces, i would use the following


fgets (name, 50, stdin);

where name in the variable, 50 is the max characters


//edit//