True or False? ...if false, please explaine why 1) If a function contains a call
ID: 3532389 • Letter: T
Question
True or False? ...if false, please explaine why
1) If a function contains a call-by-refference formal parameter, then the function's return type should not be void.
2) The name of an argument that is passed to a formal parameter of a function (when calling the function) cannot be the same as the name of the parameter.
3) A fuction cannot simultaneously have both a call-by-refference parameter and a call-by-value parameter.
4) Suppose that int fun1(int x) is correctly defined, then the following statements int y=10; and cout << fun1(y*5) << endl; are legal when used in the calling function.
Explanation / Answer
1. False-------it can be void.
2.False----------it can be done as a new variable in function domain will be created.
3. False----------we can have any no and any type of parameter.
4.True.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.