Skip to main content

C++ FAQ's

"C++/OOPS Programming" Questions With Answers".


Here, are some sample questions based on "C++/OOPS Programming Language". Read it carefully as these questions will improve your basic concept on C++/OOPS programming language, and will help you in cracking any interview.

Click on any question to find out it's answers:


1) What is a class ?
2) What is an object ?
3) List the advantages of object oriented programming ?
4) What is meant by 'call by value' ?
5) What is meant by 'call by reference' ?


6) What is a reference variable ? What is its use ?
7) What are inline functions ? What is the advantage of using them ? How are they declared ?
8) What are the defining traits of an object-oriented language ?
9) What is the purpose of the scope resolution operator ?
10) What are the differences between type casting and automatic type conversion ?


11) Why ‘char’ is often considered as an integer data type ?
12) What is the difference between structure and class in C++ ?
13) What is the purpose of ios:app ?
14) What is the purpose of ios::ate ?
15) How is random access of data achieved in C++ ?


16) Which header file is required for creating and manipulating data files in C++ ?
17) What is an access specifier ?
18) How is memory allocated to a class and its objects ?
19) What is the difference between an object and a class ?
20) Differentiate between data hiding and encapsulation ?


21) What is polymorphism? Explain with an example ?
22) What is public, protected and private ?
23) What is the significance of the protected access specifier ?
24) Do 'derivation' and 'friendship' mean the same ?
25) Enlist some advantages of object oriented programming ?


26) Is prototyping mandatory in C++ ? Why ?
27) When should a function be made inline ?
28) How is a static variable different from a static function ?
29) What is meant by macro ?
30) What do you mean by inline function?


31) What is a constructor? Why would I ever use one?
32) What are destructors really for? Why would I ever use them?
33) Is a default constructor equivalent to a constructor having default arguments?
34) Why is a destructor function required in a class?
35) What is a parameterized constructor?


36) What is a copy constructor?
37) What is a default constructor? What is its role?
38) What is meant by constructor overloading?
39) What is operator overloading?
40) What operators can/cannot be overloaded?


41) How is operator overloading implemented successfully in C++?
42) What is abstract class?
43) What is concrete class?
44) What is function overloading and operator overloading?
45) What is a ‘friend’ function?


46) Do ‘friends’ violate encapsulation?
47) What are some advantages/disadvantages of using friends?
48) What do you mean by the friend function and friend class?
49) Why should I use `new' instead of trustworthy old malloc()?
50) How do I allocate / unallocate an array of things?


51) What if I forget the `[ ]' when `delete'ing array allocated via `new X[n]'?
52) What are free store operators?
53) What do you mean by free storage list or AVAIL list?
54) What is meant by static memory allocation?
55) What is dynamic memory allocation?


56) Define free store ?
57) What do you mean by a self referential structure?
58) What is inheritance? What the types of inheritance?
59) What are the different types of inheritances?
60) What is the difference between a virtual base class and a normal base class?


61) What is meant by a visibility mode?
62) What's the difference between `public:', `private:', and `protected:' visibility modes?
63) When should you use inheritances?
64) How do you express `private inheritance'?
65) What are the access rules with `private' and `protected' inheritance?


66) What is meant by inheritance hierarchy ?
67) Differentiate between multiple and multilevel inheritances ?
68) What is an ABC (`Abstract Base Class') ?
69) What is a `virtual destructor' ?
70) What is a dangling pointer or wild pointers ?


71) What is abstraction?
72) How is abstraction and encapsulation interrelated?
73) What is an adaptor class or Wrapper class?
74) What is a container class? What are the types of container classes?
75) What is polymorphism?


76) What do you mean by a static data member and a static member function?
77) What is modularity in C++?
78) What do you mean by data abstraction?
79) What is a pointer? How will you define a pointer to an integer and a pointer to a character?
80) How does a pointer variable differ from a simple variable?


81) What is a nested structure ?
82) How are arrays and structures related to each other ?
83) What is the difference between structure and class?
84) What is the difference between get and getline member functions ?
85) Differentiate between ifstream class and ofstream class?


86) Name the streams generally used for file operations.
87) What do you mean by ‘this’ pointer?
88) What is a data structure?
89) List four major operations associated with linear data structures?
90) What are trees in C++?


91) State conditions under which binary search is applicable.
92) What is a linked list?
93) Differentiate between functions read() and write().
94) What is a null pointer?
95) What is a memory leak?

96) What is a stack?
97) What is meant by overflow in C++?
98) What is an infix expression?
99) What do you mean by static binding?
100) What do you mean by a node?


Comments

Popular posts from this blog

Tell Me Something About Yourself - Interview Answers.

Try to introduce some of your most important employment-oriented skills as well as your education and accomplishments to the interviewer. Answer to this question is very important because it positions you for the rest of the interview . That's why this statement is often called the "Positioning Statement". One should take the opportunity to show his/her communication skills by speaking clearly and concisely in an organized manner. Since there is no right or wrong answer for this question hence it is important to appear friendly. YOUR ANSWERS CAN BE: 1) I am a person with strong interpersonal skills and have the ability to get along well with people . I enjoy challenges and looking for creative solutions to problems. 2) Besides the details given in my resume, I believe in character values, vision and action. I am quick in learning from mistakes. I am confident that the various tests that you have conducted will corroborate my competencies apti

HR Interview Questions With Simple Answers - Top 30.

Here are some very important HR questions which are often asked during Interviews and I believe these answers can really help you to get through....... Click on them to view the answer: 1) Tell Me Something About Yourself ? 2) What Are Your Strengths? 3) What Are Your Weaknesses? 4) How Do You Handle Pressure / Can You Work Well Under Pressure? 5) What Are Your Short Term Goals? 6) What Are Your Long Term Goals? 7) Where Do You See After 5 Years? 8) Why Should We Hire You? 9) What Is Your Salary Expectation? 10) Why Do You Want To Leave Your Current Job? 11) Do You Prefer To Work Alone Or As A Team Player? 12) What Made You Choose Your Major / Stream? 13) Why Didn’t You Pursue A Career In Your Major / Stream? 14) Why Do You Want To Work For Us? 15) Are You Willing To Travel? 16) Are You Willing To Take Risks? 17) What Do You Know About This Company? 18) What Do You Seek From A Job? 19) How Do You Evaluate Success? 20) During Your Performance Rev

Why Should We Hire You? - Interview Answers

The interviewer asks this question just to find out how your skills, experience and knowledge can add value to the job. Well to answer this question you need to learn what they are looking for and then tie them with your strengths. This ensures that you are a viable fit for the position. The more detail you give the stronger your answers will be. Try to summarize all your accomplishments and relate what makes you unique. The question can also be " Why should we hire you over other candidates? " OR "Why should we hire you over the others waiting to be interviewed?" Your answers can be: 1) You should hire me because I’m the best person for the job. I realize that there are likely other candidates who also have the ability to do this job. Yet I bring an additional quality that makes me the best person for the job - my passion for excellence. I am passionately committed to producing truly class results. 2) I believe I’m the perfect fit for this