tiannahines4504 tiannahines4504
  • 24-11-2022
  • Computers and Technology
contestada

define a function swaprank() that takes two char parameters passed by reference and swap the values in the two parameters. the function does not return any value. ex: if the input is b c, then the output is: c b

Respuesta :

NomulaHarsh NomulaHarsh
  • 26-11-2022

The program that takes two char parameters passed by reference and swaps the values in the two parameters is shown below.

What is a program?

A computer program is a set of instructions written in a programming language that a computer can execute.

The program is illustrated below:

void Swaprank(char &a1, char &a2)

{

char t = a1;

a1= a2;

a2 = t;

}

Output

B

C

C B

To know more on programming follow this link below:

brainly.com/question/26642771

#SPJ4

Answer Link

Otras preguntas

Claire’s backyard is in the shape of a rectangle, with dimensions shown in the diagram. To complete some landscaping work, she’d like to know both perimeter and
Investments can help a business increase productivity by:
what size are the stars up close ​
Given the function f(x) = -5|x + 1| + 3, for what values of x is f(x) = -12? O X= -2. x = 1 O x= -2 x = 4 O x = 2. x = 4 O x = 2, x = 4
s + 2 = 85 solve for s
Which graph represents exponential decay? 80 형 40 20 - O 2 x 80 60 LI 1401 20 1 2 3 2 3 80 60 40 20 x 80 60 40 20 2 3
For a building having a height equal to the quantity you have recorded for Day in meters (in our example 15 meters), compute the time required for the ball to f
Can I please get some help with this probem?
I would like to know how to solve this problem.
An ethical entrepreneur should make sure that employees complete workplace climate surveys. O True O False