D
Q. What is the output of the following C++ code?
#include <iostream> using namespace std; class A { static int val; public: void write(int i){ val = i; } void read(){ cout << val; } }; int A::val = 55; int main(int argc, char const *argv[]) { A a = A(); a.write(10); a.read(); return 0; }
No solution found for this question.
Add Solution and get +2 points.
You must be Logged in to update hint/solution
Be the first to start discuss.
Q. Which of the following are available only in the class hierarchy chain?
Q. Which of the following is not a valid C++ keyword?
Q. Which of the following is true?
Q. What does an escape code represent?
Q. Which one of the following is not a fundamental data type in C++?
Q. How many access specifiers are there?
Q. Which of the following correctly declares an array in C++?
Q. Identify the correct escape sequence used for the new line.
Discusssion
Login to discuss.