Question
What is the purpose of the #define directive in
programming languages like C and C++?Solution
The #define directive in C and C++ is a preprocessor command used to define macros. Macros can be constants or code snippets that are substituted into the program wherever they are referenced. For example, #define PI 3.14 defines a constant named PI with the value 3.14 . Similarly, #define SQUARE(x) ((x) * (x)) defines a macro for computing the square of a number. This directive helps in making the code more readable, manageable, and easier to maintain by avoiding the repetition of constants and code fragments. It operates at the preprocessing stage before the actual compilation of the code begins.
Which of the following phase of National Dairy Plan was referred as ‘Mission Milk — The Next Revolution’, implemented by the National Dairy Develo...
In the context of five year plans, Which of the following can be regarded as basic objective of planning in India?
I. A sizeable increase in the ...
Which of the following horticulture development mission is subsumed in Mission for Integrated Development of Horticulture (MIDH)?
The market structure called monopoly exists where there _______ in any market.
Where in India the Cold Biosphere Desert located?
In a group of students, the number of girls is three-fourth of the number of boys. If two-third of the number of girls and one-half of the number of boy...
Which film won the Best Motion Picture – Drama award at the 2025 Golden Globe Awards?
Which one of the following is not the broker platform?
Which state has the second highest number of seats in the Lok Sabha?
According to Dalton’s atomic theory, atoms combine in the ratio of small whole numbers to form ______.