Everyone thanks for your help also Monster, thanks for your advise, that works a lot better than what i have before.

now how do i put this picec of code into the main or do i put in the format name?

{
int i = 0;
char name[] = "namE";

name[0] = toupper(name[0]);
for(i = 1; name[i] != '\0'; i++)
name[i] = tolower(name[i]);
printf("name = %s\n", name);
}

also, how do i search in the string for the names that were entered and convert the first letter to upper case?