I've been banging my head against a wall here for days, trying to print initials after user name input. The errors change continually and are many. I'm trying to name the string array 'name' then iterate through it.
int main(void) { char x, y;
do
{
printf("What is your name?\n"); // prompts user for name input
name = GetString(); //store string in array name 'name'
}
while (char name[i]) != char; //checks user hasn't added integers
i = char name[i];
x = name[0]; //name the character at position 0 in the namelen array 'x' so that it can be printed later
for (i=0; i<strlen(name); i++) //iterates along the length of the string to the end
{
if (isspace(name[])
{
char isspace(char [y]);
y ++; //select next character after space and allocates variable name 'y' (so it can be printed later)
}
}
toupper(x); toupper(y);
printf("%c%c\n", x,y);
}