void test(char* name) { for(int i=10; i >= 0; i--) { if(name[i] == ' ') name[i] == '\0'; else break; } }