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]
2 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]2 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
When should you create an outline?
DIA [1.3K]

Answer:

hope you like it

Explanation:

Writing an outline can take place at any time during the writing process. Although it is most commonly used before beginning to write or doing research, this process can also take place during or after writing your paper to make sure your points are organized and make sense.

An outline is a first step for writing: a general, unfinished plan that you will use as a guideline in writing, not a finished product ready to publish. You should use it when you prepare to write a rough draft, before you started writing.

8 0
3 years ago
Lost passwords set for documents in Microsoft® Word® documents can be retrieved in the backstage view. True False
Nat2105 [25]

Answer:

True

Explanation:

Hope this helped!

3 0
2 years ago
Read 2 more answers
Hy <br> Anyone from kerala?
Lera25 [3.4K]

Answer:

i dont know

Explanation:

7 0
2 years ago
Read 2 more answers
The ________ maps the software architecture created in design to a physical system architecture that executes it. (Points : 3) a
VARVARA [1.3K]

Answer:Deployment diagram

Explanation: Deployment diagram is the diagram that is used for displaying the hardware parts upon which the software architecture works.The main purpose of the diagram is showing the function and operations taking place through the deployment of the software system with the hardware.

These diagrams are made up of the nodes , interface, artifacts and other components. Other given options are incorrect because architectural diagram is for designing of the architecture of a system,sequence diagram is used for the sequential order display of system components and  state chart diagram is the diagram that shows the status of the parts of the operating system.

Therefore, the correct option is deployment diagram.

8 0
3 years ago
The GPS device in an automobile uses which communication channel?
Feliz [49]
The GPS device in an automobile uses the satellite communication channel. GPS stands for Global Positioning System. It is based on the satellite navigation system that consists of a number of satellites. This is being used to loacate places and determine exact location, time and speed.
4 0
2 years ago
Other questions:
  • What are the 4-bit patterns used to represent each of the characters in the string "1301"? Only represent the characters between
    14·1 answer
  • How do you change brightness on acer laptop?
    7·1 answer
  • In statistics the mode of a set of values is the value that occurs most often. Write a program that determines how many pieces o
    10·1 answer
  • Write a JavaScript program to generate the following pattern but the number of rows should be user input.
    8·1 answer
  • William found out that someone used his report on american culture without his permission. what is william a victim of?
    11·1 answer
  • A "start transaction" is set to be the system's first screen displayed once you log in to GCSS-Army. Setting up a start transact
    14·1 answer
  • Which application is a digital version of a manual typewriter? A. Database B. Presentation C. Spreadsheet D. Word processor
    8·2 answers
  • In an oblique drawing, which lines can be measured accurately, if there is no foreshortening?
    10·1 answer
  • Assume variables SimpleWriter out and int n are already declared in each case. Write a while loop that printsA. All squares less
    11·1 answer
  • g How safe is to have a LinkedIn account where you have published all the important information about yourself
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!