Welcome to Westonci.ca, where finding answers to your questions is made simple by our community of experts. Explore comprehensive solutions to your questions from knowledgeable professionals across various fields on our platform. Our platform offers a seamless experience for finding reliable answers from a network of knowledgeable professionals.
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
We appreciate your time. Please revisit us for more reliable answers to any questions you may have. Thanks for stopping by. We strive to provide the best answers for all your questions. See you again soon. Thank you for visiting Westonci.ca, your go-to source for reliable answers. Come back soon for more expert insights.