https://www.rakeshmgs.in/search/label/Template
https://www.rakeshmgs.in
RakeshMgs

Operators in C Language Hindi Notes

Updated:

 Operators in C Language

Variables के अंदर values store करवाकर आप उन variables पर कई प्रकार के operations perform कर सकते है। उदहारण के लिए दो integer variables के अंदर value store करवाकर आप addition का operation perform कर सकते है और उन दोनों variables की values के sum को print करवा सकते है। इसी प्रकार आप और भी अलग अलग operations variables के साथ perform कर सकते है।

Variables के साथ operations perform करने के लिए आपको अलग अलग operators यूज़ करने पड़ते है। इस chapter में आपको ऐसे ही operators के बारे में बताया जा रहा है।

C operators निम्नलिखित प्रकारों में वर्गीकृत किया जा सकता है:-
1. Arithmetic operators
2. Relational operators
3. Logical operators
4. Bitwise operators
5. Assignment operators
6. Conditional operators
7. Special operators

Arithmetic operators

Arithmetic operators mathematical operations perform करने के लिए यूज़ किये जाते है। जैसे की addition, subtraction, division और multiplication आदि। Arithmetic operators 5 प्रकार के होते है। ये basic mathematical operators होते है।

Relational operators

Relational operators दो variables की values को compare करने के लिए यूज़ किये जाते है। जैसे की आप इन operators का यूज़ करके पता लगा सकते है की क्या किन्ही दो variables की values बराबर है और यदि बराबर नहीं है तो कौनसे variable की value बड़ी है और कौनसे variable की value छोटी है।

इस तरह के operators को conditional statements (if,if-else,switch,for,while आदि) के साथ यूज़ किया जाता है। ये operators condition check करने के लिए यूज़ किये जाते है। Condition true होने पर value true हो जाती है और condition false होने पर value false हो जाती है।

C language में यूज़ होने वाले सभी relational operators के बारे में नीचे दिया जा रहा है।



Logical operators

Logical operators को decision making statements के साथ यूज़ किया जाता है। ये operators control statements में एक साथ दो condition को check करने के लिए यूज़ किये जाते है। उदाहरण के लिए आप किसी if statement में एक की जगह 2 conditions check कर सकते है। Logical operators के बारे में नीचे दिया जा रहा है। Suppose a = 1 and b = 0,



Bitwise operators

Bitwise operators दिए गए variables पर bit level operations perform करने के लिए यूज़ किये जाते है। Variables की decimal values bits में convert की जाती है। इसके बाद उन bits पर operations perform किये जाते है।.

C language में यूज़ होने वाले bitwise operators के बारे में नीचे दिया जा रहा है।



जैसा की आपको पता है bitwise operators bits के साथ work करते है। मान लीजिये आपने program में 2 variables a और b create किये हुए है। इन दोनों variables में आपने क्रमशः 3 और 5 values store करवाई हुई है। इनकी bits पर work करने के लिए सबसे पहले आप इन्हें binary में convert कर सकते है।

3 = 00000011
5 = 00000101

Assignment Operators

Assignment operators variables की values को एक दूसरे को assign करने के लिए यूज़ किये जाते है। C language में यूज़ होने वाले विभिन्न assignment operators के बारे में नीचे दिया जा रहा है।



Conditional operator

Conditional operator को ternary operator भी कहा जाता है। ये if-else statement की short form होती है। इसका general structure इस प्रकार होता है।
1. Ternary Operator
2. ? : Operator
यदि condition true हो तो statement one return होगा नही तो statement 2 return होगा।


आपको आर्टिकल कैसा लगा? अपनी राय अवश्य दें
Please don't Add spam links,
if you want backlinks from my blog contact me on rakeshmgs.in@gmail.com