C++ Interview Questions Part 3 21 What is the difference between a NULL pointer and a void pointer? Ans: A NULL pointer is a pointer of any type whose value is zero. A void pointer is a pointer to an object of an unknown type, and is guaranteed to have enough bits to hold a pointer to any object. A void pointer is not guaranteed to have enough bits to point to a function (though in general practice it does). 22. What is difference between C++ and Java? Ans: C++ has pointers Java does not. Java is platform independent C++ is not. Java has garbage collection C++ does not. 23. What do you mean by multiple inheritance in C++ ? Ans: Multiple inheritance is a feature in C++ by which one class can be of different types. Say class teaching Assistant is inherited from two classes say teacher and Student. 24. What do you mean by virtual methods? Ans: virtual methods are used to use the polymorphism feature in C++. Say class A is inherited from class B. If we declare say function f() as virtual in class B and override the same function in class A then at runtime appropriate method of the class will be called depending upon the type of the object. 25. What do you mean by static methods? Ans: By using the static method there is no need creating an object of that class to use that method. We can directly call that method on that class. For example, say class A has static function f(), then we can call f() function as A.f(). There is no need of creating an object of class A. 26. 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); 27. What is a constructor? Ans: Constructor is a special member function of a class, which is invoked automatically whenever an instance of the class is created. It has the same name as its class. 28. What is destructor? Ans: Destructor is a special member function of a class, which is invoked automatically whenever an object goes out of the scope. It has the same name as its class with a tilde character prefixed. 29. What is an explicit constructor? Ans: A conversion constructor declared with the explicit keyword. The compiler does not use an explicit constructor to implement an implied conversion of types. It’s purpose is reserved explicitly for construction. CAREEREXAMZ.COM

1

30 What is the Standard Template Library? Ans: A library of container templates approved by the ANSI committee for inclusion in the standard C++ specification. A programmer who then launches into a discussion of the generic programming model, iterators, allocators, algorithms, and such, has a higher than average understanding of the new technology that STL brings to C++ programming.

CAREEREXAMZ.COM

2

C++ Interview questions Part 3.pdf

What is difference between C++ and Java? Ans: C++ has pointers Java does not. Java is platform independent C++ is not. Java has garbage collection C++ ...

79KB Sizes 0 Downloads 168 Views

Recommend Documents

C interview Questions Part 7.pdf
C interview Questions Part 7.pdf. C interview Questions Part 7.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying C interview Questions Part 7.pdf.

Mechanical Engineering Interview Questions with answers - TheMech ...
... loading more pages. Retrying... Mechanical Engineering Interview Questions with answers - TheMech.in.pdf. Mechanical Engineering Interview Questions with answers - TheMech.in.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Mechanica

tcl interview questions pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. tcl interview ...

Job Interview Questions series
Best PDF C & C++ Interview Questions You'll. Most Likely Be Asked: Volume 4 (Job Interview. Questions series) - Online. Book detail. Title : Best PDF C & C++ ...

Missionary Interview Questions - Mormon Mission Prep
Do you currently have or have you ever had any physical, mental, or emotional condition that would make it difficult for you to maintain a normal missionary ...

Job Interview Questions series
ePub Download C & C++ Interview Questions. You'll Most Likely Be Asked: Volume 4 (Job. Interview Questions series) Full Online. Books detail. Title : ePub ...

AWT & SWING INTERVIEW QUESTIONS AND ANSWERS.pdf
19) What is the relationship between the Canvas class and the Graphics class? A Canvas object provides access to a Graphics object via its paint() method.

Missionary Interview Questions - Mormon Mission Prep
Do you feel that you have fully repented of past transgressions? 4. Will you share your testimony with ... Full-time missionary service requires living gospel standards. What do you understand about the ... How will these debts be paid off before you

Sample Interview Questions and Tips.pdf
Page 1 of 2. Interview Tips. Prior to the Interview Day: Research the company, their mission, and the job. If you are able to quote the mission or use their 'lingo', ...

Read Coding Interview Questions - Audiobooks
... Programming Questions and Solutions · Elements of Programming Interviews: The Insiders' Guide · Introduction to Algorithms · The Algorithm Design Manual.

vmware-interview-questions-.pdf
To restart webaccess service on vmware. service vmware-webaccess restart – this will restart apache tomcat app. 5. To restart ssh service on vmware.

performance testing interview questions pdf
questions pdf. Download now. Click here if your download doesn't start automatically. Page 1 of 1. performance testing interview questions pdf. performance ...

DRDO Interview Questions Paper 1
4) Program Segment Prefix in MS-DOS 5.0 is: 5) Some IP addresses were given and the question was to select the private addess from it(?). 6) 10Base2 and 10Base5 wires ... What is Doppler shift? What is its importance? BOARD MEMBER -2 QUESTION LEVEL-