Without Book Interview Questions and Answers | Online Test | Moct Test
Download Android App in your Android Device from Google Play Store
- Search for "Withoutbook Practice Exam Test" in Mobile/Tablet Play Store
Institute Training Search by Name or Email

Exams Attended

Make Homepage

Bookmark this page

Subscribe Email Address

C++ Interview Questions and Answers

Ques 66. What are the differences between a C++ struct and C++ class?

Ans.
The default member and base-class access specifier are different.

Is it helpful? Add Comment View Comments
Ques 67. How many ways are there to initialize an int with a constant?
Ans.
Two.
There are two formats for initializers in C++ as shown in the example that follows. The first format uses the traditional C notation. The second format uses constructor notation.
int foo = 123;
int bar (123);
Is it helpful? Add Comment View Comments
Ques 68. How does throwing and catching exceptions differ from using setjmp and longjmp?
Ans.
The throw operation calls the destructors for automatic objects instantiated since entry to the try block.
Is it helpful? Add Comment View Comments
Ques 69. What is a default constructor?
Ans.
Default constructor WITH arguments class B { public: B (int m = 0) : n (m) {} int n; }; int main(int argc, char *argv[]) { B b; return 0; }
Is it helpful? Add Comment View Comments
Ques 70. What is a conversion constructor?
Ans.
A constructor that accepts one argument of a different type.
Is it helpful? Add Comment View Comments

Most helpful rated by users:

©2016 WithoutBook