benaughty guide literoitca tags free no sign up local sex webcam models list fictionmania tv 7 days sex partner in my area are there any real sites for hooking up latest hookup app

C – Preprocessors in Hindi

0 213

Learn C – Preprocessors in Hindi

वास्तव में C Preprocessors कम्पाइलर का पार्ट नहीं है न ही ये कंपाइलेशन प्रोसेस का कोई स्टेप है बल्कि ये कंपाइलेशन प्रोसेस से पहले substitution स्टेप है जिसमें हम कम्पाइलर को ये निर्देश देते हैं कि प्रोग्राम को कम्पाइल करने से पहले ये substitution का टास्क कर ले

सभी Preprocessors कमांड में पहले कॉलम में # होता है और ये आवश्यक भी है

Syntax

#define constant_name  variable_actual_value

S.No. Directive Description
1 #define Substitutes a preprocessor macro.
2 #include #include के बाद जिस फाइल का नाम आता है उसका हैडर यहां प्रोग्राम फाइल में ऐड हो जाता है
3 #undef #define से जिस macro को डिफाइन करते हैं इस #undef  से उसे undefine करते हैं
4 #ifdef Description
5 #ifndef Description
6 #if Description
7 #else Description
8 #elif Description
9 #endif Description
10 #error Description
11 #pragma Description
13 #if Description

 

Preprocessors Examples

Syntax

#define MAX_ARRAY_LENGTH 20 
अब प्रोग्राम कम्पाइल होने से पहले जहां जहां MAX_ARRAY_LENGTH उसे 20 से replace कर देता है  

#include <stdio.h>
#include "myheaderfile.h"

इसमें दो तरह के include statement हैं पहले include statement में compiler stdio.h फाइल को अपनी हैडर डायरेक्टरी में search करता है जबकि दूसरे include statement में compiler myheaderfile.h फाइल को अपनी local डायरेक्टरी में search करता है 

#ifndef MESSAGE
   #define MESSAGE "You wish!"
#endif

ऊपर का स्टेटमेंट ये बताता है कि अगर MESSAGE  नहीं डिफाइन है तो उसे डिफाइन करे और उसकी वैल्यू  “You wish” सेट कर दे |

Predefined Macros

 

S.No. Directive Description
1. __DATE__ यह Current date को  “MMM DD YYYY” format में दिखता है
2. __TIME__ यह Current time को  “HH:MM:SS” format में दिखता है
3. __FILE__ यह Current file का नाम दिखता है
4. __LINE__ यह Current Line No.  दिखता है
5. __STDC__ यह 1 No.  दिखता है जब compile program ko ANSI standard के साथ कम्पाइल करता है

 

Leave A Reply

Your email address will not be published.