ogran to de trate call-ay reterc parmetes 2 ade toatrea ata getber A put, A npu S /Reade tw integere tro che yteand *w alu varsatlet. wrta tnterchanges the vale of variablei and variable d shoeitata output. t output /hoe the valuee ar output and out putz, in that arde 0 at aintI 12 nt firstNum, econda getumbera(tiretm, econdm wapaluna iiratn, econ showleaulta(tirstMam, seconumi zeturn o votd getunbers ngut1, ta imputa cout "Enter two Integera ein » Inputi ander ota evapvalueata vartablei, Inta variable int temp: temp vartablel; variablel = tenp vad showkesultsiiat output i, int output2) cout "In reverse order the nunbers are: « out puti .« output 2 « endl, ple Dialopar

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Esplay 4 Call-by-Rederence Parameters
/Progran to desetrate call-by reterence paranmeters
2Lnelude toatream
3lag a pace atd
4 vudd getunberet& input1, 1s input2)
S/Reade two Integere from the teytoard
swotd ewapvaluesita variablel, nta variable
1/Interchanges the values of variablei and variable2.
vold abowlleaultatit output1, int output 21
//hows the values ar outputi and output 2, in that order.
10
tnt maintT
12
int firstNum, secondNum
gettunbera (firstNum, secondhum)
wapvaluea(tiratNum, secondum
whowReaultaitirstMun, secondNum):
13
14
15
16
return o,
17 )
18
void getNunbers (ints input 1, Ints 1nput 21
19 (
20
cout "Enter two integera
etn Input 1
Input2,
21
22
23
24
votd avapvalues (inta variablel, Inta variable2)
25
26
int temp
temp variablel,
variablel variable2,
variable2 = temp
27
28
29
30 )
31
32 void showReaults(int output1, int out put 21
cout e "In reverse order the nunbers are "
« out putl «'' e output 2 e endl:
33
34
35
36 )
Sample Dialogue
Enter two 1ntegers: 5 6
In reverse order the numbers are: 6 5
Transcribed Image Text:Esplay 4 Call-by-Rederence Parameters /Progran to desetrate call-by reterence paranmeters 2Lnelude toatream 3lag a pace atd 4 vudd getunberet& input1, 1s input2) S/Reade two Integere from the teytoard swotd ewapvaluesita variablel, nta variable 1/Interchanges the values of variablei and variable2. vold abowlleaultatit output1, int output 21 //hows the values ar outputi and output 2, in that order. 10 tnt maintT 12 int firstNum, secondNum gettunbera (firstNum, secondhum) wapvaluea(tiratNum, secondum whowReaultaitirstMun, secondNum): 13 14 15 16 return o, 17 ) 18 void getNunbers (ints input 1, Ints 1nput 21 19 ( 20 cout "Enter two integera etn Input 1 Input2, 21 22 23 24 votd avapvalues (inta variablel, Inta variable2) 25 26 int temp temp variablel, variablel variable2, variable2 = temp 27 28 29 30 ) 31 32 void showReaults(int output1, int out put 21 cout e "In reverse order the nunbers are " « out putl «'' e output 2 e endl: 33 34 35 36 ) Sample Dialogue Enter two 1ntegers: 5 6 In reverse order the numbers are: 6 5
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY