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

1. The statement int main() means that main is a function that takes no argument

ID: 3705018 • Letter: 1

Question

1. The statement int main() means that main is a function that takes no arguments and returns an integer

true

false

______________________________________________________________________________

2. A C++ program can have two local variables in two different functions with the same name and same data type.

true

false

_____________________________________________________________________________________

3. int main() This function header indicates that main is a function that:

takes an integer as its argument and returns nothing

takes no arguments and returns nothing

takes an integer as its argument and returns an integer

takes no arguments and returns an integer

_________________________________________________________________________________________

4. How does a function report its result back to its calling (or boss) function if there is a value to be reported back?

By storing the result into one of the variables passed as an argument.

By storing the result directly into the caller's variable.

By cout-int the result to the screen.

By asking the user to do it.

By executing a return statement with the result.

__________________________________________________________________________________________

5. The return type void indicates that the function will return ______.

the null address

an integer

more than one value

nothing

A.

true

B.

false

Explanation / Answer

Question 1
Answer:
true

Question 2
Answer:
true

Question 3
Answer:
d. takes no arguments and returns an integer

Question 4
Answer:
e. By executing a return statement with the result.

Question 5
Answer:
d. nothing