C Programming Preprocessor
Which of the following is correct syntax for defining Mathematical constant PI using preprocessor directive in C language?
Answer: # define PI 3.14
Explanation
#define PI 3.14
This is the correct syntax for defining a constant using the C preprocessor directive.
It replaces every instance of PI with 3.14 before compilation begins.
This question appeared in
Past Papers (6 times)
ETEA 25 Years Past Papers Subject Wise (Solved) (2 times)
KPK Teacher Past Papers SST PST CT TT PET (2 times)
Secondary School Teacher SST Past Papers, Syllabus, Jobs (2 times)
This question appeared in
Subjects (1 times)
COMPUTER (1 times)
Related MCQs
- What is the syntax for defining a method in Ruby?
- Which of the following is correct syntax in Excel?
- If the variable name is 'age' and the programmer wants to input age, which is the correct syntax?
- What is the correct syntax to access the value at address ptr in C, where ptr is a pointer?
- An authoritative directive for conduct is called?
- In C programming, preprocessor directives start with _____ character.
- Language learning processes, like how language is acquired, how language is stored in the brain, how language is accessed and processed by the brain, are studied under?
- In a constant level tube size of the bubble renains constant because upper wall is
- According to equation of continuity A1V1 = A2V2 = constant. The constant is equal to the ______?
- Which of the following models does not necessitate defining requirements at the earliest in the lifecycle?