Vidyalelo
C++ Programming · Q115

Introduction to C++

Programming · C++ Programming · question 115

Q115

What will be the output of the following C++ code? #include class Test public: void fun(); ; static void Test::fun() std::cout<<"fun() is static"; int main() Test::fun(); return 0;

A.
fun() is static
B.
Compile-time Error
Answer
C.
Run-time Error
D.
Nothing is printed

Answer: Option B

Solution

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