Question
Please answer to these questions: Programming Language: C++ 1. A constant cannot be passed by reference. = true or false? 2. Which of the following
Please answer to these questions:
Programming Language: C++
1. A constant cannot be passed by reference. = true or false?
2. Which of the following are true for default arguments?
Select one or more:
a. They should be placed in both the prototype and function header.
b. They should be placed in the function header only if there is no prototype
c. Any of the function parameters may or may not have default arguments.
d. The parameters with default arguments must come last (to the right) of the ones that don't have default arguments.
e. Default arguments can be either variables or constants
3. Which of the following are true for static variables but not for other variables?
Select one or more:
a. If they are defined and initialized on the same line, this line is guaranteed to only be executed once.
b. They can only be used in the scope where they are defined.
c. They can be used as arguments when calling a function
d. They retain the value stored in them even after the function where they are defined returns
e. They can be defined and initialized on the same line.
4. Select the two correct statements about stub functions:
Select one or more:
a. stubs are used to test the functionality of a program
b. stubs must return a value
c. stubs are programs that test if a called function returns the correct result
d. stubs are simpler than the functions they replace
5. Select everything that main.cpp should contain when using separate compilation
Select one or more:
a. includes for all standard libraries used in any source file in the project
b. includes for all separate compiled functions
c. includes for all necessary source files
d. includes for all standard libraries used in main
e. int main()
6. Separate compilation was useful in older programming languages, but having multiple files adds an unnecessary layer of complexity and is discouraged in modern programming languages. = true or false?
Thank you
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started