C preprocessor?

WBOY
Release: 2023-08-27 14:53:06
forward
1271 people have browsed it

C preprocessor?

The C programming language supports preprocessors in order to work the program efficiently.C preprocessoris a macro preprocessor for C-based programming languages. The preprocessor provides the compiler with the ability to include header files, macro expansion, conditional compilation, and line control in an explicit manner.

#hashtag is used to define preprocessors, that is, all preprocessors start with #. This is followed by the name of the preprocessor without any spaces. Here is a list of C preprocessors.

S.No. Preprocessor Description
1. #include

Include specific header files from a file.
2. #define

Define preprocessor macros.
3. #undef

Undefine preprocessor macro
4. #if

Checks the compile-time condition and evaluates toTruevalue.
5. #else

Evaluate as an alternative to if preprocessor .
6. #ifndef

Checks whether the macro is defined. If undefined, evaluates to TRUE .
7. #elif

Simultaneously combine#ifand#elsestatements.
8. #error

Defined bystderrmethod Printed error message.
9. #endif

End preprocessor condition.
10. #pragma

Used to issue commands to the compiler/

The above is the detailed content of C preprocessor?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!