Interview answers verified by specialists.

Find interview questions and answers on this website:

See right interview answers on 30 common job interview questions

Can you define which header file to include at compile time?

Yes. This can be done by using the #if, #else, and #endif preprocessor directives. For example, certain
compilers use different names for header files. One such case is between Borland C++, which uses the header
file alloc.h, and Microsoft C++, which uses the header file malloc.h. Both of these headers serve the same
purpose, and each contains roughly the same definitions. If, however, you are writing a program that is to
support Borland C++ and Microsoft C++, you must define which header to include at compile time. The
following example shows how this can be done:

#ifdef __BORLANDC__
#include <alloc.h>
#include <malloc.h>

When you compile your program with Borland C++, the __BORLANDC__ symbolic name is automatically
defined by the compiler. You can use this predefined symbolic name to determine whether your program
is being compiled with Borland C++. If it is, you must include the alloc.h file rather than the malloc.h file.

Do you know that?

63% prerer the freelancer lifestyle insdead of full-time employment Next


Getting payments for Freelancers
1. Read how to register and get earned money

2. Open account within 5 minPayoneer sing up to get free $25