1 what is the output of the following program fragment cout a 4 b 2 c 8 d 16 2 what 5346750
1/ What is the output of the following program fragment ?
cout a.4 b.2 c.8 d.16
2/ What is the value returned by the following function ?
int function()
{
int value=35;
return value +5;
value +=10;
}
a.35 b.40 c.50 d.10
3/ When overloading a function, what must be true ?
a. The names should be different with the same number and/ or types of parameters.
b. The names should be the same with different number and/ or types of parameters.
c. The names should be different with different number and/ or types of parameters
d.The names should be the same with the same number and/ or types of parameters.
4/ If you have the two functions as shown,
int someFunction(int value);
double someFunction(double value);
and a variable x, which is a double, which function is called by the following statement ?
cout a.someFunction(int value); b.someFunction(double value); c.Nothing, it is a syntax error d.both functions are called
5/ What is the value of the following ?
sqrt(sqrt(pow(2,4)));
a.1 b.2 c.4 d.16
6/ Which of the following is a legal call to the displayOutput fucntion ?
void displayOutput(int total);
a. void displayOutput(myTotal); b.displayOutput(int mytotal)
c. displayOutput(myTotal); d.cout 7/ Call-by-reference parameters are passed
a.nothing b.an address c.the value in the actual argument d.none of the above