Examveda

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

D. 2

Answer: Option C


Join The Discussion

Related Questions on Functions and Procedures in C plus plus