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
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
Get step-by-step solutions from verified subject matter experts
