Questions Chapter 14
|
Programming in C |
©
Kishori Mundargi; contributors: Myriam Grandchamp, anisa chaudhary Source: PEOI
|
Practice questions of Chapter 14
R-
cprog14-1: What is meant by preprocessor?
R-
cprog14-2: Why do we need a preprocessor?
R-
cprog14-3: What is the role of an include directive?
R-
cprog14-4: What does "#include <systemfile.h>" signify?
R-
cprog14-5: What does "#include "userfile.h"" signify?
R-
cprog14-6: What is meant by a portable application?
R-
cprog14-7: What is conditional compilation?
R-
cprog14-8: What are some common conditional compilation statements?
R-
cprog14-9: If we have the following piece of code, what will be the
result?
#ifdef _WIN32_
#define INT_SIZE 32
#else
#define INT_SIZE 16
#endif
R-
cprog14-10: What is the use of #error directive?
R-
cprog14-11: What is the difference between #warning and #error ?
R-
cprog14-12: What are macros?
R-
cprog14-13: Why do we need macros?
R-
cprog14-14: What is the purpose of #define directive?
R-
cprog14-15: If #define TRUE 1 , then what will be the value of TRUE in the
program?
R-
cprog14-16: Consider #define AREA (HEIGHT * WIDTH) and #define SQUARE(x)
((x)*(x)), are these statements syntatically correct?
R-
cprog14-17: Why is it wise to use parentheses for macros including mathematical expressions?
R-
cprog14-18: What is the advantage of macros over functions?
R-
cprog14-19: What are the disadvantages of using a macro?
R-
cprog14-20: Name different predefined macros and their significations.
[Your opinion is important to us. If have a comment, correction
or question pertaining to this chapter please send it to
comments@peoi.org
.]