0
Write the output of the follwing program segment.
Write the output of the follwing program segment char *NAME="CoMpuTeR"; for(int x=0;x<strlen(NAME);x++) if(islower(NAME[x])) NAME[x]=toupper(NAME[x]); else if(isupper(NAME[x])) if(x%2==0) NAME[x]=tolower(NAME[x])); else NAME[X]=NAME[x-1]; puts(NAME);
2 odpowiedzi
+ 8
looks like the person has copied this into the question field instead of the description field
+ 2
In general, the. output is nothing, as you simply haven't performed any cout operations.
You may get an error, as the if isn't terminated by a null statement or braces. But since its a fragment, perhaps you forgot to copy the if's enclosure.