JOIN us on
WhatsApp Group Join Now
Telegram Join Join Now

हिंदी माध्यम नोट्स

Categories: C Language in hindi

Operator advance in c language in hindi c कंप्यूटर भाषा में ऑपरेटर अडवांस लेवल

c कंप्यूटर भाषा में ऑपरेटर अडवांस लेवल Operators advance in c language in hindi
operator Part-1 मे , हमने basic operator को study किया | इस article मे कुछ advance operators और operator की advance termology को study करेगे|
sizeof ( ) Operator
sizeof ( ) के compile time operator है |जब इसे किसी operand पर useकिया जाता है तब ये oprand के द्वारा occupied bytes की number को return करता है| oprand कोई भी variable,datatype और constant हो सकता है |
उदहारण :
m=sizeof(Age);
n=sizeof(long int);
n=sizeof(char);
sizeof ( ) operator को array की size को निकालने के लिए इस्तेमाल किया जाता है |इसका उपयोग किसी variable की dynamic  memory allocation के लिए किया जाता है |
Comma Operator
comma operator दो या दो अधिक expression को जोड़ना के लिए किया जाता है |इस तरह के operator मे left तो right की तरफ read होता है |उदहारण के लिए :
X = (a=6 , b=8 , a+b);
इस expression सबसे पहले a=6 और b=8 होगा |बाद मे 6+8=14 ,X मे assign होता है |comma operator का looping मे बहुत इस्तेमाल होता है |
for loop मे : for (i=1,i<9,i++);
Airthmatic Expression :
Airthmatic expression यो expression होते है जिसमे Airthmatic operator का यूज़ होता है |इसे तीन भागो मे बाटा गया है |
1.Integer Airthmatic Expression :
जब किसी expression मे सभी operand integer होते है तब इसे integer expression कहते है| और इसका result भी integer भी होता है | जैसे
a+b=72;
a*b=15;
जब किसी DIVISION मे दोनों variable SAME SIGN होते है की तब result ZERO आ जाता है |और किसी एक variable का SIGN MINUS होती है तब RESULT 0 और -1 हो सकता है |
2.Real Airthmatic Expression :
जब किसी expression मे सभी operand REAL NUMBER होते है तब इसे REAL expression कहते है| और इसका result भी REAL NUMBER भी होता है | जैसे
a/b=1.2/2=0.6  ;
b*a=1.2*2=2.4;
MODULAS OPERATOR को REAL OPERAND के साथ नहीं यूज नहीं कर सकते है |Type Casting:
Type casting C language की वो technique है जिसमे C कोम्प्लिएर किसी data type को दुसरे data type मई ऑटो माटिक change कर देता है | ये दो प्रकार के होती है :-
IMPLICIT TYPE CASTING :
जब C COMPILER, AUTOMATIC किसी DATA TYPE को किसी दुसरे data TYPE मई CHANGE कर देता है तब उसे IMPLICIT TYPE CASTING कहते है |EXPRESSION को CALCULATE सरलता से कैलकुलेट करने के लिए ,C COMPILER इस TYPE CASTING कोइस्तेमल करता है |

इस TYPE CASTING मे कुछ RULES FOLLOW होते है |जो निम्न है :-
1.जब किसी expression मे दो अलग -अलग type के Oprand use होते है तब LOWER TYPE आटोमेटिक HIGHER TYPE मे CONVERT हो जाता है |और expression का आउटपुट भी HIGHER TYPE मे होता है |
2. Character और Short data type हमेशा integer मे CONVERT हो जाता है |
3.अगर किसी expression मे long double data type होता है तब बाकि के datatype आटोमेटिक long double मे CONVERT हो जाता है | RESULT भी long double मे मिलता है |
4.अगर किसी expression मे operands long integer और unsigned long integer होते है तब unsigned integer, long integer मे कन्वर्ट हो जाता है और expression का आउटपुट भी long integer  मे मिलता है|

नीचे दिए गये डायग्राम मे TYPE CONVERSION के क्रम को बताया गया है जिसे C COMPLIER FOLLOW करता है |

EXPLICIT TYPE CASTING :
जब प्रोग्रामर द्वारा किसी operand के data type को दुसरे data type मे CONVERT करता है तब इसे  EXPLICIT TYPE CASTING कहते है |इसका syntax नीचे है :-

(TYPE CASTING DATA TYPE) EXPRSSION ;

यह पर TYPE CASTING DATA TYPE का मतलब यूजर द्वारा DESIRED DATA TYPE है |


EXAMPLE:
#include<conio.h>
void main ()
{
int a,b,c;
printf(“Enter your input = “)
scanf(“%d”,&a);
printf(“Enter your input = “);
scanf(“%d”,&b);
(float)c=a/b;
printf(“Your output = %f”, c);
}
यह पर a/b का आउटपुट float datatype मे आयगा इसलिए प्रोग्रामर ने explicit type casting से integer c को float c मे convert कर दिया है |

आउटपुट होगा :
Enter your input = 23
Enter your input = 25
Your output = 0.92

Sbistudy

Recent Posts

Question Tag Definition in english with examples upsc ssc ias state pcs exames important topic

Question Tag Definition • A question tag is a small question at the end of a…

2 weeks ago

Translation in english grammer in hindi examples Step of Translation (अनुवाद के चरण)

Translation 1. Step of Translation (अनुवाद के चरण) • मूल वाक्य का पता करना और उसकी…

2 weeks ago

Report Writing examples in english grammer How to Write Reports explain Exercise

Report Writing • How to Write Reports • Just as no definite rules can be laid down…

2 weeks ago

Letter writing ,types and their examples in english grammer upsc state pcs class 12 10th

Letter writing • Introduction • Letter writing is an intricate task as it demands meticulous attention, still…

2 weeks ago

विश्व के महाद्वीप की भौगोलिक विशेषताएँ continents of the world and their countries in hindi features

continents of the world and their countries in hindi features विश्व के महाद्वीप की भौगोलिक…

2 weeks ago

भारत के वन्य जीव राष्ट्रीय उद्यान list in hin hindi IAS UPSC

भारत के वन्य जीव भारत में जलवायु की दृष्टि से काफी विविधता पाई जाती है,…

2 weeks ago
All Rights ReservedView Non-AMP Version
X

Headline

You can control the ways in which we improve and personalize your experience. Please choose whether you wish to allow the following:

Privacy Settings
JOIN us on
WhatsApp Group Join Now
Telegram Join Join Now