Can a file other than a .h file be included with #include?
Submitted by: MuhammadThe preprocessor will include whatever file you specify in your #include statement. Therefore, if you have the line
#include <macros.inc>
in your program, the file macros.inc will be included in your precompiled program. It is, however, unusual programming practice to put any file that does not have a .h or .hpp extension in an #include statement. You should always put a .h extension on any of your C files you are going to include. This method makes it easier for you and others to identify which files are being used for preprocessing purposes.</macros.inc>
Submitted by: Muhammad
#include <macros.inc>
in your program, the file macros.inc will be included in your precompiled program. It is, however, unusual programming practice to put any file that does not have a .h or .hpp extension in an #include statement. You should always put a .h extension on any of your C files you are going to include. This method makes it easier for you and others to identify which files are being used for preprocessing purposes.</macros.inc>
Submitted by: Muhammad
Read Online C Preprocessor Job Interview Questions And Answers
Top C Preprocessor Questions
☺ | Tell us bitwise shift operators? |
☺ | Can you please explain the scope of static variables? |
☺ | What do you know about the use of bit field? |
☺ | What is typedf? |
☺ | Do you have any idea about the use of "auto" keyword? |
Top C Programming Categories
☺ | C Functions Interview Questions. |
☺ | C Pointers Interview Questions. |
☺ | C Preprocessor Interview Questions. |