In this tutorial, We are providing you C++ questions and answers. The content here will help all the Freshers as well as experienced people to get through with their interviews for software industry on campus or off campus. For any person who wants to get into an IT industry is expected to have the basic knowledge of these programming language ,i.e, C and C++ ,as most of the universities and colleges have C or C++ as a part of their curriculum. Whether a Fresher or an experienced, the interviewer hits atleast few questions based on C or C++ concepts to them.
One common factor in the fresher interview is that there are few questions that has been repeatedly asked over years. Therefore, we have accumulated few questions and related answers based on C++ concepts and programming for freshers and experienced,both.Go through them,develop an understanding towards it.This will surely help you out during your placements and interviews.
What is difference between C and C++ ?
[Usually this is the first question that people face in their interview rounds. When you answer this question,don’t give the text-book explanations.Rather supplement your answer with real software related examples. Answer for this interview question can include below points.]
- C++ is a kind of superset of C, most of C programs except few exceptions work in C++ as well.
- C is a procedural programming language, while C++ supports both procedural and Object oriented programming.
- Since C++ supports object oriented programming, it supports features like function overloading, templates, inheritance, virtual functions, friend functions. These features are absent in C.
- C++ supports exception handling at language level,but in C exception handling is done in traditional if-else style.
- C++ supports references but C doesn’t.
- In C, scanf() and printf() are mainly used for input/output.While C++ mainly uses streams to perform input and output operations. ‘cin’ is standard input stream and ‘cout’ is standard output stream.
What is a class?
[Probably this would be the first question for a Java/c++ technical interview for freshers and sometimes for experienced as well. Try to give examples when you answer this question.]
When we define any class, we are not defining any data, we just define a structure or.. Read Full Blog at : C++ Interview Questions and Answers Part-1
You can check more informative blogs and tutorials at android development blogs section and can also browse the android developer forum for posting and viewing latest questions on android development.