V Working with the Preprocessor

V.1: What is a macro, and how do you use it?

V.2: What will the preprocessor do for a program?

V.3: How can you avoid including a header more than once?

V.4: Can a file other than a .h file be included with #include ?

V.5: What is the benefit of using #define to declare a constant?

V.6: What is the benefit of using enum to declare a constant?

V.7: What is the benefit of using an enum rather than a #define constant?

V.8: How are portions of a program disabled in demo versions?

V.9: When should you use a macro rather than a function?

V.10: Is it better to use a macro or a function?

V.11: What is the best way to comment out a section of code that contains comments?

V.12: What is the difference between #include <file2> and #include "file" ?

V.13: Can you define which header file to include at compile time?

V.14: Can include files be nested?

V.15: How many levels deep can include files be nested?

V.16: What is the concatenation operator?

V.17: How can type-insensitive macros be created?

V.18: What are the standard predefined macros?

V.19: How can a program be made to print the line number where an error occurs?

V.20: How can a program be made to print the name of a source file where an error occurs?

V.21: How can you tell whether a program was compiled using C versus C++?

V.22: What is a pragma?

V.23: What is #line used for?

V.24: What is the _ _FILE_ _ preprocessor command?

V.25: How can I print the name of the source file in a program?

V.26: What is the _ _LINE_ _ preprocessor command?

V.27: How can I print the current line number of the source file in a program?

V.28: What are the _ _DATE_ _ and _ _TIME_ _ pre-processor commands?

V.29: How can I print the compile date and time in a program?

V.30: How can you be sure that a program follows the ANSI C standard?

V.31: How do you override a defined macro?

V.32: How can you check to see whether a symbol is defined?

V.33: What common macros are available?

No comments:

Post a Comment

 
Online Advertising Top Blogs Computers