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

How was the Stamp Act different from earlier taxes imposed on the British colonies?
X+y=-13 and 4x+6y=-72
In the number 15.2201 how does the value of 2 in the tenths place compare to the value of the 2 in the hundredths place
simplify the expression
Rachel bought 3 CDs that were each the same price. Including sales tax, she paid a total of $35.40. Of that total, $2.70 was tax. What was the price of each CD
Find dy/dx by implicit differentiation: x^2y^2 - xy =4
2- log 6-log 9 In condensing
The radius of a circle is increasing at a rate of 3 ft/min. At what rate is its area changing when the radius is 5 ft.
Yuto and Lian are at train stations 1,880 kilometers apart. Yuto boards a train heading east at an average speed of 220 kilometers per hour. At the same time, L
which part of chromosomes passes in trait from parent to offspringa. allele b. gene c. genotype d. phenotype e. zygote ​