Q28
What will be the output of the following code: int add(int x, int y) return x + y; int main() cout << add(2); in C++?
A.
Compilation error due to missing return statement
B.
0
C.
Compilation error due to missing argument
AnswerD.
2
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board