Question: C++ language Answer the following questions about the program below. #include iostream> using namespace std; int func (int n, int m); int main ) int
Answer the following questions about the program below. #include iostream> using namespace std; int func (int n, int m); int main ) int x = 1; int y 5 int z - func (x, y ); { return 0; int fune (int n, int m) tint p 4; return (n m+ p: 1. What is the scope of identifier z'? a. main b. func c. both main and func 2. What is the lifetime of identifier p? a. b. start of the program to the end execution of function func only 3. Which identifiers represent parameters in the code? 4. Which identifiers represent arguments in the code? 5. What is the output of the code? 6. What would happen if this code omitted the line of the function prototype? a. The code would still work correctly as the function prototype is only added for readability The code woul the main function. b. ld have an error as the compiler would not be able to resolve identifier fune used in
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
