Author: naman


Knowledge quiz
Questions 13
Criteria 70% to pass
Difficulty Hard
Play as logged
Get stats, badges and other cool features
(after login you will be redirected back to this page)

Play with friends competition
in real time
Online quiz competitions for the best score
Challenge your friends in real time
Create a competition of this quiz and see who of your friends gets the highest score. Share it, engage your friends and challenge them in real time to get the best score. Learn more about quiz competitions

What is the difference between struct and class in C++?

Predict the output of following C++ program #include<iostream> using namespace std; class Empty {}; int main() { cout << sizeof(Empty); return 0; }

class Test { int x; }; int main() { Test t; cout << t.x; return 0; }

Assume that an integer and a pointer each takes 4 bytes. Also, assume that there is no alignment in objects. Predict the output following program. #include<iostream> using namespace std; class Test { static int x; int *ptr; int y; }; int main() { Test t; cout << sizeof(t) << " "; cout << sizeof(Test *); }

A member function can always access the data in __________ , (in C++).

Which of the following is not correct (in C++) ? Class templates and function templates are instantiated in the same way Class templates differ from function templates in the way they are initiated Class template is initiated by defining an object using the template argument Class templates are generally used for storage classes

Which of the following cannot be passed to a function in C++ ?

When a method in a subclass has the same name and type signatures as a method in the superclass, then the method in the subclass _____ the method in the superclass.

It is possible to define a class within a class termed as nested class. There are _____ types of nested classes.

Which of the following, in C++, is inherited in a derived class from base class ?

Which of the following is not a member of class?

Which of the following is not correct for virtual function in C++

Which of the following is not a correct statement?

Results of quiz competition


SHARE with your friends

Enter your e-mail and get the opportunityto be notified of the competition results to your e-mail

Your result of the quiz

Your result of the survey


Quiz results

Survey results

Share with friends