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
What does the word tolerance mean in textiles?
Firdavs [7]
It means the willingness to respect or except thecustoms, beliefs, or opinions of others
4 0
3 years ago
After hacking into atm systems remotely using a laptop, What attacker worked with the atm manufacturers to resolve the identifie
Aneli [31]

grey hat hackers are those after hacking into ATM systems remotely using a laptop, works with the ATM manufacturers to resolve the identified security vulnerabilities

  • A grey hat hacker is simply known as an hacker that falls between the range of black and white hacker. They are known to illegally break into systems so as to show off their skills to the administrator of the system they penetrated or to seek to sell their services in repairing security breaches.

  • In the ATM case, they attacked it and then also want the ATM manufacturer to use their service.

Conclusively we can therefore say that the hacker was a gray hat hacker.

Learn more from

brainly.com/question/15899195

3 0
3 years ago
Which of the following best describes the purpose of an Egyptian pyramid?
Flura [38]

Answer:

C

Explanation:

Had this on edgnuity

Please give a brainliest

7 0
3 years ago
Read 2 more answers
a key part of staying safe is employing good habits. drag the step number to the proper sequence triple a
solong [7]

Answer:

where are the step number. I can't find any

6 0
3 years ago
Write a function called rotateRight that takes a String as its first argument and a positive int as its second argument and rota
elena-s [515]

Answer:

The function in Python is as follows:

def rotateRight(strng, d):

   lent = len(strng)

   retString = strng[lent - d : ] + strng[0 : lent - d]

   return retString

Explanation:

This defines the function

def rotateRight(strng, d):

This calculates the length of the string

   lent = len(strng)

This calculates the return string

   retString = strng[lent - d : ] + strng[0 : lent - d]

This returns the return string

   return retString

Addition:

The return string is calculated as thus:

This string is split from the <em>index passed to the function to the last element of the string, i.e. from dth to last.</em>

<em>The split string is then concatenated to the beginning of the remaining string</em>

3 0
3 years ago
Other questions:
  • Software used the control a computer's hardware
    14·1 answer
  • Help 30 points I will mark brainliest!!!!!!!!!!!
    10·1 answer
  • What runs horizontally and is identified with numbers?
    12·2 answers
  • A USB flash drive uses solid
    7·1 answer
  • Calculate the data rate capacity for a 2400 baud signal where there are M=8 levels per symbol. a. 2400 bps b. 4800 bps c. 7200 b
    12·1 answer
  • "The ______ of an operational system that supports an organization includes policies, requirements, and conditional statements t
    13·1 answer
  • &lt;
    6·1 answer
  • What security setting can cause a mobile device to erase installed apps and data if the passcode is incorrectly entered a number
    11·1 answer
  • The value that decides whether something falls into one category or another is called a ____
    13·1 answer
  • Why, during the final stage of the multistage model for e-commerce, is comprehensive customer information captured in the suppli
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!