D

Dharmendra Sir • 3.53K Points
Extraordinary

Q. What is the output of the following C++ code?

Code:
#include <iostream> 
using namespace std; 
class A 
{ 
  int s; 
   public: 
  #define ABC(A::s)
};
 
int main(int argc, char const *argv[])
{
  cout << "Hello world";
  return 0;
}
  • (A) Hello world
  • (B) Compilation error
  • (C) Segmentation Fault
  • (D) No output
  • Correct Answer - Option(B)
  • Views: 116
  • Filed under category C++

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics