Home / MCQ Bank / Computer
Computer Plus Plus Miscellaneous Difficulty: Medium

What will be the output of the following C++ code? #include <iostream> using namespace std; class X { public: int a; void f(int b) { cout<< b << endl; } }; int main() { int X :: *ptiptr = &X :: a; void (X :: * ptfptr) (int) = &X :: f; X xobject; xobject.*ptiptr = 10; cout << xobject.*ptiptr << endl; (xobject.*ptfptr) (20); }

Select the correct option to test your answer:

More Computer Questions

Messages from one computer terminal can be sent to another by using data networks. The message to be sent is converted to an electronic digital signal, transmitted via a cable, telephone or satellite and then converted back again at the receiving end. What is this system of sending messages called? In a doubly linked list, which of the following is true about the last node? When you are building administrative links you'll need to accept two arguments, which of the following are they? Which of the following is also known as SOROBAN Which header file in C++ provides support for random number generation?