C++ Online Quiz - TutorialsPoint
C++ Online Quiz - TutorialsPoint
Questions Page Next Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to C++ Framework. You will have to read all the given answers and
click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can
use Next Quiz button to check new set of questions in the quiz.
#include<iostream>
abc() {
i = ++x;
}
};
int abc::x;
main() {
abc m, n, p;
cout<<m.x<<" "<<m.i<<endl;
}
A-31
B-33
C-11
D-13
Show Answer
Q 2 - The operator used to access member function of a structure using its object.
A-.
B - ->
C-*
Show Answer
https://www.tutorialspoint.com/cplusplus/cpp_online_quiz.htm 1/3
9/5/2017 C++ Online Quiz - TutorialsPoint
Q 3 - Pick up the valid declaration for overloading ++ in postfix form where T is the class name.
A - T operator++();
B - T operator++(int);
C - T& operator++();
D - T& operator++(int);
Show Answer
A-0
B-1
C-2
D-4
Show Answer
#include<iostream>
A - Done
B - Compile error
C - Runtime error
Show Answer
A - Function template
B - Class template
B - Inherited class
Show Answer
#include<iostream>
cout<<i--;
}
A-0
B - Compile error
https://www.tutorialspoint.com/cplusplus/cpp_online_quiz.htm 2/3
9/5/2017 C++ Online Quiz - TutorialsPoint
C - 65535
D - 32767
Show Answer
#include<iostream>
float y = 5;
r = y%x;
cout<<r;
}
A-1
B-0
C-2
D - Compile error
Show Answer
A - Int
B - bool
C - DOUBLE
D - __0__
Show Answer
Show Answer
Advertisements
https://www.tutorialspoint.com/cplusplus/cpp_online_quiz.htm 3/3