What is the function of the #define preprocessor directive in a C program?
- Controls the execution flow of the program
- Declares a variable within the program
- Defines a constant value for use in the program
- Includes a header file in the program
The #define directive is used to define constants. It allows you to specify a constant value that is used throughout the program, making it easier to maintain and modify the code.
Loading...
Related Quiz
- What is the purpose of the feof function in file handling in C?
- The ________ directive is used to define symbolic names or constants in a C program.
- What happens to the memory allocation when a structure is defined?
- The function fopen in C opens a file and returns a pointer of type ________.
- In an application that writes user data to a text file, what precaution should be taken to avoid data corruption or loss?