Skip to main content

C++/OOPS Interview Questions And Answers - Part III.

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

Question - 11) Why ‘char’ is often considered as an integer data type?

Answer: The memory implementation of char data type is in terms of the number code, which is an integer. Therefore, it is said to be another integer data type.

Question - 12) What is the difference between structure and class in C++?

Answer: A structure is a collection of data while the class is a collection of data and functions. Further, all members are public by default in a structure while all members are private by default in class. Class has greater data security than structure.

Question - 13) What is the purpose of ios:app?

Answer: The function of ios::app is to retain the previous contents of a file and to append to the end of the existing file contents, rather than truncating them.

Question -14) What is the purpose of ios::ate?

Answer: The purpose of ios::ate is to place file pointer at the end of the file, but you can write data anywhere in the file.

Question - 15) How is random access of data achieved in C++?

Answer: In C++, random access is achieved by manipulating seekg( ), seekp( ), tellg( ) and tellp( ) functions. The seekg() and tellg() functions allow you to set and examine the get_pointer, and the seekp() and tellp() functions perform these operations on the put_pointer.


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?

... Back To C++ Programs Index

... Back To C++ FAQ's Index

... Back To C Programs Index

... Back To C FAQ's Index

... Back To HR Interview Index


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.


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 aptitude and right attitude for the…

100 C Programs Frequently Asked in Technical Interview.

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?"
"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 position. I’m very detai…