Question: how do I fix this ? :) initials.c exists. :) initials.c compiles. :( Outputs HLJ for Hailey Lynn James expected HLJ , not H L...

how do I fix this ?

:) initials.c exists. :) initials.c compiles. :( Outputs HLJ for Hailey Lynn James expected "HLJ ", not "H L\..." :( Outputs HLJ for hailey lynn james expected "HLJ ", not "H L\..." :( Outputs HJ for hailey James expected "HJ ", not "H J\..." :) Outputs B for BRIAN

#include #include #include #include

int main(void) {

string name = get_string(); printf("%c", toupper(name[0])); for (int i = 0; i < strlen(name); i++) {

if (name[i] == ' ')

{

printf("%c", toupper(name[i+1])); } printf(" "); }

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!