Question: 13) For the following C++ code: int foo = 5; int bar = 6; int a = bar; bar = 9 + foo; int b
13) For the following C++ code:
int foo = 5;
int bar = 6;
int a = bar;
bar = 9 + foo;
int b = a + foo;
a + 6;
b + a + bar;
What value will the variable 'a' hold after all these lines are evaluated?
a) we can't know
b) 10
c) 14
d) 12
e) 6
14) For the following C++ code:
int foo = 5;
cout << foo << endl;
foo = 6;
cout << foo << endl;
foo = 5;
cout << foo << endl;
What value will the variable 'foo' hold after all these lines are evaluated?
a)5
b)6
c)5 6 5
d)we can't know
e)6 5 6
15) For the following C++ code:
int foo = 5;
int bar;
int a = bar;
bar = 9 + foo;
int b = a + foo;
a + 6;
b + a + bar;
What value will the variable 'a' hold after all these lines are evaluated?
a)we can't know
b)20
c)14
d)12
e)6
29) You can write programs that never end using loops. t f
30) Computer memory is made up of literal zeros and ones. t f
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
