Vidyalelo
C++ Programming · Q28

Functions and Procedures in C++

Programming · C++ Programming · question 28

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
Answer
D.
2

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board