Expressions c programming in hindi

Expressions c programming in Hindi: Aaj ke is tutorial me hum c programming me expression ke bare me padhege. or yeh samjenge ki expression hote kya hai or inhe program me kyu use Kiya jata hai. 
expression C programming in Hindi
expression  in c 

Expression c programming in Hindi

Expression 

Expression operator or operands ka ek sequence hota hai. jo ki ek specific value ko computer karke hame output ke tor par deta hai.

Example:

A+B
A and B = operands
+ = operator

Types of expressions:

Expression 4 tarah ke hote hai. 

  • Arithmetic expressions
  • Relational expressions
  • Conditional expressions
  • Logical expressions

Note: each expression me hame koi na koi operator use karna padta hai or each expression ek valid value deta hai. agra koi expression koi value nahi deta hai to vo expression galat likha hua hai.

Arithmetic expression


Ek arithmetic expression vo expression hota hai jime ki hum arithmetic operators or operands ka use karte hai. is expression me at a time ek operation perform hota hai or output me hame integer or float value milti hai. 
Example:
20+30*40
Note: yeh ek arithmetic expression hai. kyuki isme + or * arithmetic operators hai. yaha par operation operator precedence ke anusar perform Hoga. jaise ki * operator ka precedence + operator se jayada hai ish liye 30 * 40 vala operation pahle perform Hoga or iske baad 20 + vala operation perform Hoga.

Relational expression


Ek relational expression vo expression hota hai jime ki hum 2 operators ko compare karte hai. or ek relational expression ka output ya to zero hota hai ya fir one hota hai. 
Example:
X/2 == 0
Note: yaha par hum X/2 operator ka Comparision == 0 se kar rahe hai. is liye yeh ek relational expression hai. dusre sabdo me Kahu to relational expression me hum do operators ke beach me relation dekhte hai.

Condition expression


condition expression vo expression hota hai jisme ki hum ek condition ko check karte hai. or agar condition true/ sahi hoti hai to yeh 1 return Karta hai. or nahi to zero 0 return Karta hai. 
Syntax
Exp1? exp2: exp3
Example
x > 2 ? true : false
Note: agar x ki value 2 se Badi hui to yeh expression true return Karega nahi to false return Karega. 
Aage hum conditional expression ke bare me detail me padhege. 

Logical expression


ek logical expression vo expression jo ki ya to zero value return Karta hai ya fir non-zero value return Karta hai. 
Example:
x > 2 && x < 20
so agar dono condition true hoti hai to yeh expression true Hoga. 

If you like this post then please share this post with your friends and don't forget to follow this blog.

Post a Comment

0 Comments