1) What is output by this program: #include using namespace std; void plusses (i
ID: 641591 • Letter: 1
Question
1) What is output by this program:
#include
using namespace std;
void plusses (int num){
static int number=0;
number++;
cout< }//plusses
void main() {
plusses(3);
plusses(6);
plusses(5);
system("pause");
} //main
A).2 3
4 6
6 5
B). 1 3
2 6
3 5
C).1 3
2 3
3 3
D). 1 3
1 6
1 5
2)
Which is a valid call for this function prototype where num is an int.
void goNumbers (int,double);
num=goNumbers(5,3);
goNumbers(5,3.0);
goNumbers(3.0,5,0);
D. cout<
3)
What is output by this program:
#include
using namespace std;
int abc(int a, int b) {
cout<
8 8 3 9 10
8 8 9 9 10
8 5 3 9 10
D. 8 8 11 9 10
4)
Which are good reasons for using reference variables?
It makes it more user friendly.
You need to pass it to another function that will change it.
You need to change the value of the variable in the function.
D. It makes it easier to debug the program.
5)
What is output by this program?
#include
using namespace std;
void gopher (int a,int b){
cout<
A.2 3 4 3 4 5
B. 2 3 4 4 3 2
C.2 3 4 5 4 3
D.2 5 3 4
6)
What is output by this program?
#include
using namespace std;
void rubus(int num){
if(num>0) rubus(num/2);
cout<
A.an endless loop
B.0 1 2 5
C.5 2 1 0
D.5 2.5 1.25 0.75
7)
Which are valid calls for this function prototype where x,y and z are int, a,b,c are double:
double doSomething (int&,double);
b= doSomething(b,y*0.3);
a= doSomething (5,3.0);
cout<
a= doSomething(x,y);
8)
Match each statement with its definition
int displayValues(double cost, int quantity)
displayValues (3,5.45);
int inputValues(double,int);
int inputValues(double cost, int quantity) {
cout< }
Read Answer Items for Question 8
atching program parts What are the parts of this program?
#include
using namespace std;
double ab(double a, int b){
double num=a*b;
return num;
}//dostuff
void main() {
int m=5;
double p=1.5;
cout< system("pause");
} //maining program parts What are the parts of this program?
parameter
argument
local variable
function
2
ab
a
num
function header
function call
function prototype
function definition
A).2 3
4 6
6 5
B). 1 3
2 6
3 5
C).1 3
2 3
3 3
D). 1 3
1 6
1 5
2)
Which is a valid call for this function prototype where num is an int.
void goNumbers (int,double);
num=goNumbers(5,3);
B.goNumbers(5,3.0);
C.goNumbers(3.0,5,0);
D. cout<
3)
What is output by this program:
#include
using namespace std;
int abc(int a, int b) {
cout<
8 8 3 9 10
B.8 8 9 9 10
C.8 5 3 9 10
D. 8 8 11 9 10
4)
Which are good reasons for using reference variables?
A.It makes it more user friendly.
B.You need to pass it to another function that will change it.
C.You need to change the value of the variable in the function.
D. It makes it easier to debug the program.
5)
What is output by this program?
#include
using namespace std;
void gopher (int a,int b){
cout<
A.2 3 4 3 4 5
B. 2 3 4 4 3 2
C.2 3 4 5 4 3
D.2 5 3 4
6)
What is output by this program?
#include
using namespace std;
void rubus(int num){
if(num>0) rubus(num/2);
cout<
A.an endless loop
B.0 1 2 5
C.5 2 1 0
D.5 2.5 1.25 0.75
7)
Which are valid calls for this function prototype where x,y and z are int, a,b,c are double:
double doSomething (int&,double);
b= doSomething(b,y*0.3);
a= doSomething (5,3.0);
cout<
a= doSomething(x,y);
8)
Match each statement with its definition
int displayValues(double cost, int quantity)
Read Answer Items for Question 8 .displayValues (3,5.45);
Read Answer Items for Question 8int inputValues(double,int);
Read Answer Items for Question 8 - A. B. C. D.int inputValues(double cost, int quantity) {
cout< }
Read Answer Items for Question 8
atching program parts What are the parts of this program?
#include
using namespace std;
double ab(double a, int b){
double num=a*b;
return num;
}//dostuff
void main() {
int m=5;
double p=1.5;
cout< system("pause");
} //maining program parts What are the parts of this program?
parameter
Read Answer Items for Question 10 - A. B. C. D.argument
Read Answer Items for Question 10 - A. B. C. D.local variable
Read Answer Items for Question 10 - A. B. C. D.function
Read Answer Items for Question 10 Answer A.2
B.ab
C.a
D.num
Answer A.function header
B.function call
C.function prototype
D.function definition
Explanation / Answer
1) B
2) B, C
3) D
4)A, B, C
5)A
6)A
7)A, C, D
Next question is not clear
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.