Neeven:
Try out the isspace() function
#include <ctype.h>
int j;
int isspace(int c);
isspace will test for a character that is a standard whitespace (space,tab,return,newline,vertical tab,etc).
return: returns non-zero for true, 0 for false.
should be pretty simple to implement in your code, try something like this:
Code:
if ((j = isspace(c)) == -1)
break;
else
name[i] = name[i] + 1;
similarly i'm pretty sure there is an isalpha() which behaves the same way to ensure you are not changing special symbols...
see
http://www-ccs.ucsd.edu/c/ctype.html for more information on all the functions you can use with ctype