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

Please help me understand
Helpppp I really need help with this I’m struggling
You should use different reading rates for different reading purposes. True False
According to Archimedes' principle, when will an object float in water? A. When its volume is less than the volume of water it displaces B. When its weight is e
describe Human Trafficking​
The steps to determine the sum are shown. (6.74x104)+(8.95 x 104) Step 1. Rearrange the expression: (6.74+8.95) 104 Step 2. Add the coefficients: (15.69) 104 St
write a recursive formula for the following sequence 25,43,61,79,97 F(1)= 25 F(n)= F (n-1) +18
A circular table top has a radius of 24 inches. What is the area of the table top, to the nearest square inch? Use 3.14 for Pi.
I need to know the answer
Unscribbled word Try to do these and prove that you are a geiunse 1. oewrlfsnu __________ 2. ustol ___________ 3. doliarmg __________ 4. iyll _________ 5. Biis