Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1/ What is the output of the following program fragment ? cout<<pow(4,2)<<endl;

ID: 3625159 • Letter: 1

Question

1/ What is the output of the following program fragment ?
cout<<pow(4,2)<<endl;
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<<someFunction(x);
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<<displayOutput(myTotal);
7/ Call-by-reference parameters are passed
a.nothing b.an address c.the value in the actual argument d.none of the above

Explanation / Answer

please rate - thanks

1/ What is the output of the following program fragment ?
cout<<pow(4,2)<<endl;
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<<someFunction(x);
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<<displayOutput(myTotal);
7/ Call-by-reference parameters are passed
a.nothing b.an address c.the value in the actual argument d.none of the above

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at drjack9650@gmail.com
Chat Now And Get Quote