Vidyalelo
C++ Programming · Q856

C++ miscellaneous

Programming · C++ Programming · question 856

Q856

What will be the output of the following C++ code? #include using namespace std; class Print public: void operator()(int a) cout<<a<<endl; ; int main() Print print; print(5); return 0;

A.
5
Answer
B.
Compile-time error
C.
Run-time error
D.
Nothing is printed

Answer: Option A

Solution

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