6. What does the following function return? int index_of_smallest(const double a
ID: 3572550 • Letter: 6
Question
6. What does the following function return?
int index_of_smallest(const double a[], int startIndex, int numberOfSlots);
A. a double B. the address of an integer C. an integer D. nothing
7. Which statement correctly opens an input stream named in_file and attaches it to a file name project.txt?
A. in_file=project.txt
B. in_file="project.txt"
C. in_file.open("project.txt");
D. in_file.open(project.txt);
8. In the following function call, what is passed to the second parameter?
void function1 (int& value1, int value2);
int x,y;
function1(x,y);
A. The value of y
B. Nothing, it is a void function
C. The value of x
D. A reference to the memory location of y
9. The following array declaration is legal: double scores[]={0.1,0.2,0.3};
TRUE or FALSE
10. What does the following function return?
double compute_speed(double distance);
A. a double B. distance C. an integer D. nothing
Explanation / Answer
8)
In the following function call, what is passed to the second parameter?
void function1 (int& value1, int value2);
int x,y;
function1(x,y);
Answer: tha value of y
9)
The following array declaration is legal: double scores[]={0.1,0.2,0.3};
Answer: true
10) What does the following function return?
double compute_speed(double distance);
Answer: distance
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.