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
41. Which is NOT a valid statement to initialize a variable?
ollegr [7]

I think its c I hope I'm not wrong about this If I am I'm sorry

5 0
2 years ago
What is a box with dotted border that holds a place for content on a slide called?
FinnZ [79.3K]

Answer:

Placeholders

Explanation: Placeholders are boxes with dotted borders that hold content in its place on a slide layout. Slide layouts contain different types of placeholders (for example, for text, pictures, videos, and more). You can change a placeholder by resizing or repositioning it on a slide layout. You can also delete a placeholder.

7 0
2 years ago
Please can someone help my assignment.​
sweet [91]

Answer:

my hero academia fan!!!!!!

5 0
3 years ago
Products in which titanium is used
Lynna [10]

Answer:

It is used in jewelry, tennis rackets, scissors, bicycle frames, surgical tools, mobile phones and some other high-performance products.

Explanation:

Titanium is a familiar metal. Titanium is as strong as steel but weights about half as much.

6 0
2 years ago
Read 2 more answers
Please I want help on this question <br>I want the answer quickly because I have test<br>​
Nikitich [7]

Answer:

RIGHT 90

PENDOWN

REPEAT 6

FORWARD 100

LEFT 60

END REPEAT

Explanation:

I hope this helps a little bit.

5 0
3 years ago
Other questions:
  • Variable names may contain spaces and punctuation symbols. True False
    15·1 answer
  • Suppose we provide a new implementation of the transport layer protocol tcp providing the same functionality using different alg
    14·1 answer
  • Which of the following protocols support the encryption and decryption of e-mail messages?
    13·1 answer
  • Try writing pseudo code that describes how your device uses input data to perform the action that you want.
    9·1 answer
  • The most distinctive feature of Google+ is
    15·1 answer
  • Select the correct answer.
    12·1 answer
  • Heidi uses her computer to write articles for a newspaper. She uses a program to listen to the articles before she submits them
    5·1 answer
  • Write a family database program. Create a class to represent a person and to store references to the person’s mother, father, an
    10·1 answer
  • Help me please, I'm begging you
    13·1 answer
  • A user may enter some text and the number of times (up to a maximum of 10) to repeat it. Display the text repeated that many tim
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!