Given the function definition
void something ( int a, int& b )
{
int c;
c = a + 2;
a = a * 3;
b = c + a;
}
what is the output of the following code fragment that invokes something?
(All variables are of type int.)
r = 1;
s = 2;
t = 3;
something(t, s);
cout << r << ' ' << s << ' ' << t << endl;
a. 1 14 3
b. 1 10 3
c. 5 14 3
d. 1 14 9
a. 1 14 3
Computer Science & Information Technology
You might also like to view...
A collection class is a class whose objects store a collection of values.
Indicate whether the statement is true or false.
Computer Science & Information Technology
What is displayed by the following code?
```System.out.print("Hi, ABC, good".matches("ABC ") + " "); System.out.println("Hi, ABC, good".matches(".*ABC.*"));``` a. false false b. true false c. true true d. false true
Computer Science & Information Technology