1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
s2008m [1.1K]
3 years ago
7

IN C++ PLEASE!!!! Define a function FilterStr() that takes a string parameter and returns "Good" if the character at index 4 in

the string parameter is uppercase. Otherwise, the function returns "Bad".
Ex: FilterStr("sandwich") returns

Bad

Recall isupper() checks if the character passed is uppercase. Ex: isupper('A') returns a non-zero value. isupper('a') returns 0.

string's at() returns a character at the specified position in the string. Ex: myString.at(3)
)
#include
#include
#include
using namespace std;

/* Your code goes here */

int main() {
string input;
string output;

getline(cin, input);
output = FilterStr(input);
cout << output << endl;

return 0;
}
Computers and Technology
1 answer:
Ilia_Sergeevich [38]3 years ago
8 0

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;

}

<em>See attachment for complete program</em>

Download cpp
You might be interested in
(03 MC)Why is it important to set goals and share them with others?
Ad libitum [116K]

Answer:

answer is b

Explanation:

hope it was helpful

3 0
2 years ago
What is the google search operator that limits results to a specific domain?
IrinaK [193]

Answer:

 Google search operator is also known as advanced operator which extend the various capabilities of the regular type of text searches. It basically contain various types of special characters and the commands.

Google search operator are very useful in the various technical and the content searches. This type of search operator also limits the result in the sites which are indexed with a specific domain and URL (User resource locator). The google search basically allow to use various symbols that are based on the operator.  

7 0
2 years ago
What is the different between 32bit anf 64 bit verision​
Elina [12.6K]

<u>The different between 32 bit and 64 bit version:​</u>

  • The main difference between 32-bit and 64-bit versions is that a 32-bit version can access 2^3^2 memory addresses which is roughly equivalent to 4 GB of memory.
  • On the other hand, a 64-bit version can access 2^6^4 memory addresses which equates to a huge amount of memory, 16 exabytes to be precise.  
  • Nowadays, we observe that almost all the computers have 64-bit processors, which means that they can access any amount of memory over 4 GB till 16 exabytes.
  • 64-bit processors have various advantages like the increased speed of operations, smooth multitasking and they can also support video games and software's that have high graphical requirements.
8 0
3 years ago
Please help
ExtremeBDS [4]

Answer:

Answered below

Explanation:

This solution is written in Kotlin programming language.

fun average (a: Int, b: Int, c: Int, d: Int, e: Int) : Double {

#variable to hold the addition of all parameters

var sum = a + b + c + d + e

#variable to hold the average of sum

var avg = sum / 5

return avg

}

#call the function to see how it works.

# this operation is done in the fun main()

var test: Double = average ( 5, 4, 7 , 3, 9)

print (test)

8 0
3 years ago
Advantages of a personal area network
Ratling [72]
The main advantage is the security, the pan is a personal network of one or two person so there is no risk of any leak of data, best way to share resources each other via bluetooth

4 0
3 years ago
Other questions:
  • . What physical characteristic does a retinal scan biometric device measure?
    8·1 answer
  • Compute the bitwise XOR between 10010100 and 11101010.
    12·1 answer
  • Customer Premises Equipment (CPE) includes all devices connected to the PSTN, where the ownership and the responsibility for mai
    15·1 answer
  • Explain the saying "Dress for the position you want, not the position you have."
    6·2 answers
  • Why is it so important to have employees who can critically think?
    7·2 answers
  • Given two strings s and t of equal length, the Hamming distance between s and t, denoted dH(s,t), is the number of corresponding
    6·1 answer
  • Using ________ as a promotion method will bring return visitors to your site.
    8·1 answer
  • Why do we need to make a plan before actions?
    7·1 answer
  • State True or False: 1. Application software can run without the presence of system software. 2. . A language processor translat
    14·1 answer
  • What option in the zone aging/scavenging properties dialog box will prevent dns record time stamps from being updated too often?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!