The ________ directive is used to define symbolic names or constants in a C program.
- #constant
- #define
- #enum
- #import
The correct answer is (b) #define. In C, the #define preprocessor directive is used to define symbolic names or constants. These names can simplify your code and make it more readable.
Loading...
Related Quiz
- You are designing a C program to handle a database of employees in a company. Each employee has attributes like name, ID, and salary. What would be an efficient way to manage this data?
- In a recursive function, if the base case is not properly defined, it can lead to a ________.
- What function is used to open a binary file for both reading and writing in C?
- What is a potential risk of using the gets() function for reading strings in C?
- What is the significance of using a pointer to a structure?