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
Which of the following is a step in paraphrasing?
Inga [223]

to review the most important supporting points from the original information

7 0
3 years ago
Read 2 more answers
How do you think we could print a sentence that uses a variable along with other text (ie: “My name is Joe” where ‘Joe’ is a var
Sphinxa [80]

This is for Python

name = 'Joe'

print(f'My name is {name}')

This is called string formatting. Using f before the text. This is another way

name = 'Joe'

print('My name is', Joe)

But I found that string formatting is cleaner and much more useful

4 0
3 years ago
Which function in spreadsheet software can be used to predict future sales or inventory needs?
melisa1 [442]
create a forecast, Excel creates a new worksheet that contains both a table of the historical and predicted values and a chart that expresses this data. A forecast can help you predict things like future sales, inventory requirements, or consumer trends.
6 0
3 years ago
Read 2 more answers
Absolute time would be most similar to :
mr Goodwill [35]
The absolute time would be most similar to a fact. It was theorised and in fact, approved by scientists as a scientific law which governs, according to Wikipedia, as a "<span>true and mathematical </span>time<span>, of itself, and from its own nature flows equably without regard to anything external, and by another name is called duration: relative, apparent and common </span><span>time."</span>
6 0
3 years ago
Jamie is using the UNIX file system to work on his computer. He puts a dot before the file extension to separate it from the fil
klio [65]

Answer: as a file extension

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • There are many differenttypes of models, but an individual DSS can consist of onlyone.
    15·1 answer
  • Dashed lines that display on your slide when you are moving an object and that assist you with alignment are referred to as:
    12·2 answers
  • A word object in an excel worksheet to activate the word features
    9·1 answer
  • "Packet switches have multiple links attached to them. For each attached link the packet switch has a/an ____________, which sto
    7·1 answer
  • What is the purpose of a mutator?
    8·1 answer
  • Why does a print document need a higher raster effect setting ?​
    14·1 answer
  • Write a demo test to verify the above Rectangle object accessible from demo test main program and can execute display() method t
    10·1 answer
  • What is also known as computer Network?
    6·2 answers
  • What is the shortcut key to apply /remove the subscript effect?<br> Ctrl+=<br><br> Ctrl-+
    14·1 answer
  • What software can be used for remote operation of a sunsdr2 dx?.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!