C & C++ Interview Questions You'll Most Likely Be Asked

4 of 5 Stars!

Price: $19.95

C & C++ Interview Questions You'll Most Likely Be Asked is a perfect companion to stand ahead above the rest in today’s competitive job market. Rather than going through comprehensive, textbook-sized reference guides, this book includes only the information required immediately for job search to build an IT career. This book puts the interviewee in the driver's seat and helps them steer their way to impress the interviewer. 
Table of contents
1. Memory Allocation
2. Structure and Union
3. Functions or Methods
4. Recursion
5. Pointer and its Handling
6. Templates
7. General Concepts
8. Control Flow Statements
9. Data Types, Variables and Operators
10. Macros, typedef, enum
11. Library Functions
12. Arrays
13. Files in C and File Handling
14. Exception Handling in C++
15. Memory Areas
16. Classes and its Properties
HR Questions
(a) 250 C & C++ Interview Questions, Answers and proven strategies for getting hired as an IT professional
(b) Dozens of examples to respond to interview questions
(c) 76 HR Questions with Answers and proven strategies to give specific, impressive, answers that help nail the interviews
(d) 2 Aptitude Tests download available on  www.vibrantpublishers.com
Sample from the book
(Below Questions and Answers are randomly taken from different pages of the book)
11: What are Bit Fields?

Bit fields in C let the programmer specify the actual data size allowed for the particular member. Even if an unsigned int type is declared, the memory allocated is 4 bytes irrespective of whether or not the data will occupy that much space in memory. Bit fields let you specify the maximum size to be allocated in the memory which optimizes the program. The bit fields also can be used to force alignment of memory allocated. Bit fields cannot be assigned to pointers. It can be used to implement a boundary to the value assigned during the runtime.
57: Where can near and far pointers be used?

The use of near or far pointers depend on the memory model being used by the program. If it is required to store only the offset part of the address, then a near pointer of size 2 bytes is used. If it is required to store both the segment and the offset part of the address, then a far pointer of size 4 bytes is used.
162: In C, what happens if a programmer is trying to access an array item in the index which exceeds the maximum size assigned to the array in its declaration?

Since C never does bound checking, if an array is declared as size 10 then after array initialization the programmer tries to access a 12th element, the compiler will not generate an error. The program will simply retrieve unknown, erroneous, or irrelevant data.
206: What does a destructor do to the memory?

The destructor deletes the object. It releases the memory allocated to an object which was assigned to it by the new operator or the constructor. A destructor is an important part of Garbage Collection done by the compiler to free the memory allocated to any obsolete object. When a program is interrupted abruptly by an exit keyword, the destructors are automatically called and they free the memory already allocated to the object instances. Even though it is believed that destructors are automatically called every time a program exits, it may not be 100% true in all instances. It is hence, the best practice to explicitly free all memory allocations by calling the destructors.
212: What is the difference between a protected function and a friend function?

A friend function can access the private members of a class of which it is a friend, as if the function is also a member of the class. But a protected function can be accessed only by the sub-classes of a class. Only the inherited classes can access the protected members – functions and variables. But the friend function can access all private members of the friend class. You need to declare the function as a friend function in the class for which it is a friend. You can define the function outside the class and yet, because it is a friend, it can access all private members of the class.
C & C++ Interview , IT Interview Questions , C & C++ Memory Allocation , C & C++ Structure , Union , Recursion , C & C++  Arrays , HR Questions ,  C & C++  Memory Areas ,  C & C++  Pointer , C & C++  General Concepts