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

4 of 5 Stars!

Price: $19.95


Qty. 
+-
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
INDEX
 
Includes:
(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)

198: How can a function be declared so that it can’t throw any exceptions out of its body?

Answer:

Here a bland ‘exception specification’ is used so it can’t throw any exceptions. The empty parameter field in the example below means no exceptions are to throw.

Syntax:

<return_type> <func_name> (<arg1,<arg2, . . .>>)  throw () ;

 

199: What happens if a function raises an exception which is not mentioned in the ‘exception specification list’?

Answer:

Suppose only Type X or Type Y exceptions are mentioned in the exception list of a function, and the program execution throws a Type Z exception. The control of the program will be transferred to a predefined function called unexpected().

 

200: How can the catch block be created to accept all types of exceptions (instead of just the exception types explicitly mentioned in the catch declaration).

Answer:

This can be achieved by using a special mark of three dots ‘...’ in the argument list of catch block as in the syntax given below:

Catch (...)

{

<body of catch block>

}

 

201: What are the library functions available for handling exceptions which are not caught by the catch block?

Answer:

The two library functions eventually called if the catch block couldn’t handle an exception are terminate() and unexpected(). The unexpected() function can call terminate() if there is no user defined function set for the unexpected() function.

 

202: What is the difference between the two library functions ‘terminate’ and ‘unexpected’?

Answer:

The terminate() function is called when there is no matching exception handler in the catch block for the exception type thrown in the try block.

The unexpected() function is called when a function should not throw a particular type exception, but the function did throw the type exception.

 

203: The library function terminate() eventually calls which

function in the exception handling mechanism? Plus, how can a user defined function be called instead of terminate if there is no matching handler found for an exception thrown from a try block?

Answer:

The library function terminate() eventually calls the system abort() function, which terminates the program. If the programmer wants to call a user defined function instead of terminate() , then the user defined function is set through the function ‘set_terminate’.

 

204: What is Stack unwinding?

Answer:

This is the process of destroying objects created so far, i.e. starting from try block till an exception is thrown from try block. Whatever objects have been created until that point are destroyed by calling their destructors, provided they are automatic objects.

Tags
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

Bisac
SEL037000   
COM051070
COM051210