Question

Whats the value of int1 and int2, respectively, after having executed line #6? 1. void funcl( int & x, int y) f 2. int tmp -x; x = y; y = tmp 4 //the following snippet is in the main) function int int1-122, int2-7; 6. func1( int1, int2 ); // int1?, int2 -? Select one: a. int1-122, int2-7 b. int1=7, int2-122 c. int1=7, int2-7 d. int1-122, int2-122 O

0 0
Add a comment Improve this question Transcribed image text
Answer #1
After this function is executed, both int1 and int2 will be set to the value of 7.

int1 = 7, int2 = 7

Answer

Add a comment
Know the answer?
Add Answer to:
What's the value of int1 and int2, respectively, after having executed line #6? 1. void funcl(...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 5. (7 pts) What wil display on the output screen after following program is executed? includeciostream...

    5. (7 pts) What wil display on the output screen after following program is executed? includeciostream using namespace std int b 40 int A function(int a) int main (void) int c 7, b 15 cout<cA function (e) <cendla return 6 int A function (int a) int i cout<<b<<endl; if (a>-0) else return i i-ai i--ai Ans5 6. (7 pts) Show what will appear on the output screen after the following program is executed tincludeciostream> using namespace std; void A function...

  • Consider the following program: # include <iostream> using namesapce std; void Func(int a, int bl double...

    Consider the following program: # include <iostream> using namesapce std; void Func(int a, int bl double number-25.0: int main) f int x-18, y-20; cout<c"Before: x- kex<" and y-eyecendl; Fundxy 1// end of main void Funcfint a, int b) int sum a+b; a-200; b-300; numberanumber+1.0 Which of the statements below are correct? (Select only the correct answers. There may be more than one) D A The statement double number-25.0; declares a global variable number B. The variables x and y are...

  • Question 15 5 pts What's stored in the Accumulator register after this code is executed? Express...

    Question 15 5 pts What's stored in the Accumulator register after this code is executed? Express your answer as a decimal value. ORG 19 LOAD X ADD Y STORE Z HALT X, DEC 7 Y, DEC 1 1, HEX

  • 1.   What will be the value of x after the following code is executed? int x...

    1.   What will be the value of x after the following code is executed? int x = 10, y = 20; while (y < 100) { x += y; } A.   90 B.   110 C.   210 D.   This is an infinite loop 2.   If a superclass has constructor(s): A.   then its subclass must initialize the superclass fields (attributes). B.   then its subclass must call one of the constructors that the superclass does have. C.   then its subclass does not inherit...

  • Consider the following program: # include <iostream> int x = 3, y = 5; void foo(void)...

    Consider the following program: # include <iostream> int x = 3, y = 5; void foo(void) { x = x + 2; y = y + 4; } void bar(void) { int x = 10; y = y + 3; foo( ); cout << x << endl; cout << y << endl; } void baz(void) { int y = 7; bar( ); cout << y << endl; } void main( ) { baz( ); } What output does this program...

  • 1. In a function that gets a value from the keyboard and communicates that value to...

    1. In a function that gets a value from the keyboard and communicates that value to the main function via a parameter, the parameter used is considered __________. 2. In a function that receives a value from the main function via a parameter and then displays the parameter value on the screen, that parameter is considered __________. 3. In a function that receives one parameter value from the main program and passes back a changed value of the parameter, that...

  • MATLAB Test Cases: % [area1] = integrals(int1, int2) int1 = 1 2 3 4 5 6...

    MATLAB Test Cases: % [area1] = integrals(int1, int2) int1 = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 int2 = Columns 1 through 14 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 6 9 12 15 18 21 24 27 30...

  • 6) What is the final value of variable num after executing the following statements? void Exam(int...

    6) What is the final value of variable num after executing the following statements? void Exam(int & N) A)13 ( T++ ¢ut << < 1 ) B)12 void main() (int num-10; C) 11 for (int i - 0; i < 3; i.) Exam (num). D) 10

  • 2. What is the value of x alter the following code is executed # include<iostream> using...

    2. What is the value of x alter the following code is executed # include<iostream> using namespace std; int main int t-0, c- 0,x-3; while (c < 4) t=t+x; cout << x return 0; a) 3 b) 21 c) 24 d) 48 3. What is the output of the following code? # include<iostream> using namespace std; int main0 int a- 3; for (int i 5; i >0; i) a a+i cout << a << “ “ return 0; d) 8...

  • 81. The following function call doesn’t agree with its prototype:              cout << BoxVolume( 10, 5...

    81. The following function call doesn’t agree with its prototype:              cout << BoxVolume( 10, 5 );                    int BoxVolume(int length = {1}, int width = {1}, int height = {1});                                                     T__   F__                                                                     82. The following function is implemented to swap in memory the          argument-values passed to it:         void swap(int a, int b)                   {           int temp;             temp = a;             a = b;             b = temp;        ...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT