Functions – Point Out Errors

1. Point out the error in the program

Screenshot 7

A. Missing parenthesis in return statement
B. The function should be defined as int f(int a, int b)
C. Redeclaration of a
D. None of above

Correct Answer: C. Redeclaration of a

2. Point out the error in the program

Screenshot 1

A. Error: Prototype declaration
B. No error
C. Error: return statement cannot be used with conditional operators
D. None of above

Correct Answer: C. Error: return statement cannot be used with conditional operators

3. Point out the error in the program

Screenshot 2

A. Error: Not allowed assignment
B. Error: Doesn’t print anything
C. No error
D. None of above

Correct Answer: A. Error: Not allowed assignment

Leave A Comment?

19 + 7 =