कंटेंट को अपडेट किया 15/02/2023
अगर आप ये जाना चाहती हो कि #define क्या है इसका प्रयोग कहा होता है। तो निचे दिए गए बिंदुओं से आपको ज्ञात हो जाएगा।
- #define एक प्रीप्रोसेसर निर्देश है जिसका उपयोग C प्रोग्राम में मैक्रोज़ को परिभाषित करने के लिए किया जाता है।
- #define को मैक्रोज़ डायरेक्टिव के रूप में भी जाना जाता है।
- #define निर्देश का उपयोग कुछ स्थिर मान या एक नाम के साथ एक अभिव्यक्ति घोषित करने के लिए किया जाता है जिसका उपयोग हमारे C प्रोग्राम में किया जा सकता है।
#include <stdio.h>
#define QUANTITY 12
#define PRICE 7
int main()
{
int Amount = QUANTITY * PRICE;
printf("Amount : %d", Amount);
}
Output:
Amount
84