Which of the following is correct syntax for defining Mathematical constant PI using preprocessor directive in C language?
- # define PI 3.14
- # define PI = 3.14
- define PI = 3.14
- None of these
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.
Related MCQs
- Format
- Modify
- Draw
- Tools
اس سوال کو وضاحت کے ساتھ پڑھیں
- Trim
- Offset
- Extrude
- Fillet
اس سوال کو وضاحت کے ساتھ پڑھیں
بڑی اسکرین پر ویڈیو تصاویر دکھانے کے لیے کون سا آؤٹ پٹ ڈیوائس استعمال ہوتا ہے؟
- Scanner
- Printer
- Projector
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
اینٹی وائرس سافٹ ویئر کا کیا کام ہے؟
- Protect against malware and viruses
- Manage email accounts
- Create and edit spreadsheets
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
کمپیوٹر کو ایک الیکٹرانک ڈیوائس کے طور پر کیسے بیان کیا جا سکتا ہے؟
- Carry out arithmetic operations
- Carry out logical operations
- Do complicated calculations
- Accept and process by implementation sequentially a set of stored instructions