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
ycow [4]
3 years ago
11

A Function checkMe takes three parameters, a character and two integers. If the sum of the two integers is negative, and the cha

racter has the value 'n', the function sets the integers to zero so that when the function returns, those integers have a zero value in the caller (main) program. Otherwise the function changes the character to a 'p' (so that it is changes in the caller), no matter what it started with! Give a SAMPLE CALL from main, a prototype and a function definition for this function.

Computers and Technology
1 answer:
Paul [167]3 years ago
7 0

Answer:

Check the explanation

Explanation:

Here is the program with function definition and two sample calls.

Code:

#include <iostream>

using namespace std;

//checkMe FUNCTION which takes values a, b and c

void checkMe(char &a, int &b, int &c)

{

//if sum of b and c is negative and a is 'n', b and c are set to 0, otherwise a is set to 'p'

if((b+c)<0 && a=='n')

{

b = 0;

c = 0;

}

else

{

a = 'p';

}

}

int main()

{

//first test case when else part is executed

char a = 'n';

int b = 5;

int c = 6;

 

checkMe(a, b, c);

 

cout<<a<<" "<<b<<" "<<c<<endl;

 

//second test case when if part is executed

a = 'n';

b = -4;

c = -5;

 

checkMe(a, b, c);

 

cout<<a<<" "<<b<<" "<<c<<endl;

return 0;

}

Kindly check the Output below:

You might be interested in
Substance abuse is an _____ coping mechanism.
hichkok12 [17]
Mental coping mechanism.
7 0
3 years ago
______ lets people access their stored data from a device that can access the Internet.
Lelechka [254]

Answer:

Cloud computing and applications

Explanation:

6 0
3 years ago
Which of the following is not true about network design?Group of answer choicesIn designing LAN networks, network designers tend
sergey [27]

Answer:

In designing LAN networks, network designers tend to design err on the side of providing for less capacity than what is currently necessary.

Explanation:

In designing LAN networks, network designers tend to design err on the side of providing for less capacity than what is currently necessary is not true about network design.

8 0
3 years ago
What is does ram means,??
jenyasd209 [6]
It means to roughly force something into place or an ungelded boy sheep XDDD
7 0
3 years ago
Read 2 more answers
What three reasons does Dr. Boyd give to explain why returning to a friends only network would be impossible
Digiron [165]
Ummmmmm... Dr. Boyd is a Psychologist  that has nothing to do with computers and technology
7 0
3 years ago
Other questions:
  • In ssl/tls, a specific set of protocols that a particular cryptographic system will use to provide protection is called a ______
    5·1 answer
  • What information medium is used to access information from the Internet in the form of HTML pages?
    12·1 answer
  • Which of the following would most likely be responsible for configuring firewalls and IDPSs, implementing security software, and
    8·2 answers
  • If none of the contacts of a manual switch change status when the operator is activated, what is the most probable cause?
    9·1 answer
  • A ____ typically rests on the desk or other flat surface close to the user’s computer, and it is moved across the surface with
    13·1 answer
  • For this lab you will do 2 things:
    14·1 answer
  • Which does plug-and-play refer to?
    14·1 answer
  • What is the right age to start coding in high school?
    11·1 answer
  • Which data type is -7
    13·1 answer
  • Which is an example of a demand account
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!