Experience the power of community-driven knowledge on IDNLearn.com. Our experts provide timely and accurate responses to help you navigate any topic or issue with confidence.
Sagot :
Answer:
Replace /*Your code goes here */ with
string FilterStr(string str){
string retStr= "BAD";
if(isupper(str.at(4)) != 0){
retStr = "GOOD";
}
return retStr;
}
Explanation:
This defines the function
string FilterStr(string str){
This initializes the return string to BAD
string retStr= "BAD";
This checks if the string at index 4 is uppercase;
if(isupper(str.at(4)) != 0){
If yes the return string is updated to GOOD
retStr = "GOOD";
}
This returns the return string
return retStr;
}
See attachment for complete program
Your participation means a lot to us. Keep sharing information and solutions. This community grows thanks to the amazing contributions from members like you. IDNLearn.com is your go-to source for accurate answers. Thanks for stopping by, and come back for more helpful information.