Question: Whats wrong with this function? int myFn(int x) { if(x == 0) return 2 * x; } Question 4 options: It returns the wrong type.
Whats wrong with this function? int myFn(int x) { if(x == 0) return 2 * x; }
Question 4 options:
| It returns the wrong type. | |||||||||||||||||
| The argument type does not match the parameter type. | |||||||||||||||||
| The function may not return any value. | |||||||||||||||||
| The statement "return 2 * x;" is not enclosed in { }.
What is wrong with the program below? void abc(int &a) { int newValue = 6; cout << "The value passed is " << a << endl; a = newValue; } int main() { abc(5); return 0; } Question 5 options:
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
