OPERATOR IN C LANGUAGE IN HINDI

Leave a Comment
Bhaiyo mje pta h ki English p PPA ko smjna thoda hard h ....isliye m aaj Hindi m notes upload kr RHA hu....
..



C language...

Bhaiyo c language baht hi powerful language h ...
C language ek programming language h ..isme baht small module hote h Jo ek specific work ko karne k liye bne hote ....

Module :-  

Module jyada kuch nahi small coding blocks hote h means ,hum Jo coding likhte h uske chote blocks ko modules kehte h
...
Ab baat aati c language k sub parts ki yani c language m Jo b chize use hoti h unki details ab m apko btaunga...

Pehli chiz Jo h vo h..operators

Operators..

Operators vo symbols hote h jinka use kisi specific work ko krn k liye kia jata h...

Generally 4 types k operators hote h :--


  1. Unary operators
  2. Binary operators
  3. Ternary operators
  4. Bitwise operators

Unary operators

According to this operator, in operators ka use sirf ek hi operand k saath hota .
Operand vo values hoti h jinke bich operators ka use kia jata h jese ki 2+2
Isme '+' operator ka use kia gya h and ye operator jinke bich use ho RHA h vo operands h
Unary operator only two types k hote 
1. Increment operator
2. Decrement operator

Increment :--- increment operator kisi b value me 1 add kr deta h ..for example
X = ++10
Ab x ki value 11 ho chuki h kyoki 10 me '++' operator ka use krk uski value m 1 add krdia gya h

Decrement :--- decrement operator kisi b value me 1 minus kr  deta h..for example 
X = --10
ab x ki value 9 ho chuki h kyoki 10 me '--' operator ka use krk uski value m 1 minus krdia gya h

Binary operators

Binary operator ka use 2 operands k bich hota h ..Binary operators k types kuch iss prakar h :--
1. Assignment operator
2. Relational operator
3. Logical operator
4. Arithmetic operator

Assignment operator :--- ye operator kisi b value ko kisi b variable ya constant ko assigned karne k liye use hota ...for example 
X = 10
Yaha mne  X ( Jo ki ek variable h)  ko ek value assign krwai h vo value 10 h .. To ESA mne '=' iss operator ka use krk kiya h ise " equal to" operator bhi kehte h
Assign krwan mtlb hota kisi b value ko kisi variable m dalna...yaha mne X me 10 value dali h..
Me niche is operator ki ek puri list de RHA hu...


OperatorDescriptionExample
=Simple assignment operator. Is operator se me Variable 'C' me A+B KI value ko assign kr RHA hu
For example AGR A ki value 10 h or B ki value 5 h to C ki value A+B hogi yani ki 15 hogi
C = A + B will assign the value of A + B to C
+=Add AND assignment operator. Ye operator right side wale operand ko left side wale operator k saath add kr deta h or Jo value aati use left side wale operand ko de deta h ...for example ...agr C ki value 10 h or A ki value 5 h or agr hume C=C+A krna h to hum iss equation ki bajaye ye likh skte h "C+=A" ye right side wale operand (A) ko left side wale operand (C) se add krdega or Jo value aayegi use C ko dedegaC += A is equivalent to C = C + A
-=Subtract AND assignment operator. Ye operator left side wale operand me se right side wale operand ko minus krdeta h ...or Jo value aati h use left operand ko de deta hC -= A is equivalent to C = C - A
*=Multiply AND assignment operator. It multiplies the right operand with the left operand or result ko left operand ko dedeta hC *= A is equivalent to C = C * A
/=Divide AND assignment operator. It divides the left operand with the right operand and assigns the result to the left operand.C /= A is equivalent to C = C / A
%=Modulus AND assignment operator. It takes modulus using two operands and assigns the result to the left operand.C %= A is equivalent to C = C % 


Relational operators :--- ye operators two operand ki bich relation define karta h ...jese hum ek dusre ko bhi bolte h ki Bhai tu mjse chota h ya Bhai m tu mjse bada h to thik ESA hi operands k bich b hota h ek operand dusre operand se chota ya bada ya equal bhi ho skta h to ESA hum relational operator ka use krk k check krte h
For example AGr A = 10 h and B = 5 or muje ye check krna h ki inme se kon bada ya chota h to m ese check kruga ...
a>b ya a
Inn operator ki puri list m niche de RHA hu

>Greater than....Checks if the value of left operand is greater than the value of right operand. If yes, then the condition becomes true.(A > B) is not true.
<less than..... checks if the value of left operand is less than the value of right operand. If yes, then the condition becomes true.(A < B) is true.
>=Greater than and equal .....Checks if the value of left operand is greater than or equal to the value of right operand. If yes, then the condition becomes true.(A >= B) is not true.
<=Less tha and equal....Checks if the value of left operand is less than or equal to the value of right operand. If yes, then the condition becomes true.(A <= B) is true.

Logical operator :---- ye operator tb use kiye jate h jab Hume kinhi do operand k bich logic conditions lgani hoti h.....for example ..agr A = 10 and B= 15 h to AGR me "&&" AND logic operator lgata hu ...to ye check krega ki koi b program inn dono conditions ko satisfy karta h ya ni ....means ya to result true hoga nito false..
Me niche inn operator ki list de RHA hu

OperatorDescriptionExample
&&Called Logical AND operator. If both the operands are non-zero, then the condition becomes true.(A && B) is false.
||Called Logical OR Operator. If any of the two operands is non-zero, then the condition becomes true.(A || B) is true.
!Called Logical NOT Operator. It is used to reverse the logical state of its operand. If a condition is true, then Logical NOT operator will make it false.!(A && B) is true.
Arithmetic operator :---- ye operators tb use kiye jate h jb hume kinhi two operand k bich arithmetic operations lagane hote h ..arithmetic mtlb mathematical hota h..
For example :-- 2+3 yha pe plus operator ka use krk 2 and 3 ko add kiya ja RHA h 
ESE kuch or arithmetic operators h Jo niche list m diye hue h
Hum A ko let krlete h 10 and B ko 20 ..isi k adhaar PR niche table di gyi h...means table me A and B ki value 10 or 20 hogi.
OperatorDescriptionExample
+Adds two operands.A + B = 30
Subtracts second operand from the first.A − B = -10
*Multiplies both operands.A * B = 200
/Divides numerator by de-numerator.B / A = 2
%Modulus Operator and remainder of after an integer division.B % A = 0

Ternary operator

Ye operators three ya isse jyada operands k saath use ho Skte h...
Inhe conditional operator bhi kehte h
OperatorDescriptionExample

? :Conditional ExpressionIf Condition is true ? then value X : otherwise value Y
Yaha if ko "?" Sign se denote kiya hua h
Or else ko ":" sign se denote kiya hua
For example:--
/* example of ternary operator */
   a = 10;
   b = (a == 1) ? 20: 30;
   printf( "Value of b is %d\n", b );

   b = (a == 10) ? 20: 30;
   printf( "Value of b is %d\n", b );

Is example me a ki value 10 h and b ki value k liye ternery operator ka use hua h 
B = (a==1) ? 20 : 30
Means pehle to condition check hogi ki A ki value 1 k equl h ya ni AGR 1 ke equal h to B ki value 20 hogi age A ki value 1 ke equal ni h to B ki value 30 hogi

Bitwise operator

Ye generally low level programs me use hoti h to ise jyada deeply study krn ki koi need ni h bcz C language ek high level language h
Aap iske kuch signs yaad kr lijiye bss

BELOW ARE THE BIT-WISE OPERATORS AND THEIR NAME IN C LANGUAGE.

  1. & – Bitwise AND
  2. | – Bitwise OR
  3. ~ – Bitwise NOT
  4. ^ – XOR
  5. << – Left Shift
  6. >> – Right Shift

0 comments:

Post a Comment