Relational Operators in C Language

50 %
50 %
Information about Relational Operators in C Language
Education

Published on March 5, 2014

Author: cmarathi

Source: slideshare.net

Description

The presentation shows the relational operators in C programming language

www.cmarathionline.com RELATIONAL OPERATORS IN C Bhalchandra Gholkar www.cmarathionline.com

RELATIONAL OPERATORS IN C Meaning Example Value of the expression < less than age < 30 > greater than height > 6.2 Value is 0 (Zero) if expression is false <= less than or equal to taxable <= 20000 >= greater than or equal to temperature >= 98.6 == equal to marks == 100 != not equal to number != 250 Value is 1 (one) if expression is True www.cmarathionline.com Operator

if(‘a’<‘P’) { ………. ………. } If x contains 5 and y contains 10 then value of the expression is 1 and condition is true If x contains 10 and y contains 4 then value of the expression is 0 and condition is false As ASCII value of A is 97 and ASCII value of P is 80 the expression is false and value of the expression is 0 If block www.cmarathionline.com if(x<y) { ………. ………. }

if(x) { ………. ………. } Valid condition. -5 is a truth value and is non zero. So value of the expression is 1 and statement is true! If x contains any non zero value the expression is true and value of the expression is 1. If x contains zero, value of the expression is 0 and statement is false www.cmarathionline.com if(-5) { ………. ………. }

Add a comment

Related presentations

Related pages

Relational Operators in C - Tutorialspoint

Relational Operators in C. ... shows all the relational operators supported by C language. ... understand all the relational operators available in C ...
Read more

Relational Operator in C Programming Language

Relational operators in c programming is used for specifying the relation between two operands such as greater than,less than and equals. Relational ...
Read more

C Language operators - Tutorialspoint

Relational Operators. The following table shows all the relational operators supported by C. Assume variable A holds 10 and variable B holds 20 then −
Read more

Relational operator - Wikipedia

In computer science, a relational operator is a programming language construct or operator that tests or defines some kind of relation between two entities.
Read more

Operators in C and C++ - Wikipedia

Operators in C and C++ ... Comparison operators/relational operators ... by a factored language grammar, ...
Read more

C Relational and Equality Operators - msdn.microsoft.com

C Language Reference ... The binary relational and equality operators compare their first operand to ... For the other relational operators ...
Read more

C Operators: Arithmetic, Logical, Conditional and more

C Programming Operators. ... Example #4: Relational Operators // C Program to demonstrate the working of arithmetic operators #include int main() ...
Read more

Relational Operator in C language - YouTube

Relational operator are symobols such as less than, greater than, less than or equal to, greater than or equal to. Relational operators are used ...
Read more

Relational Operators - Computer Science

Relational Operators . There are six relational operators: : ... a + b /= c*c + d*d ... if a relational expression involves // ...
Read more

Relational Operators: <, >, <=, and >= - msdn.microsoft.com

The binary relational operators determine the following relationships: When two pointers to objects of the same type are compared, the result is determined ...
Read more