Posts

Showing posts with the label Relational operator in C

Operators in C Language | Part-3

Relational Operator Relational operators are used to perform a logical test or create a condition. List of the logical operator is as given below... Relational opertor Meaning > Greater Than < Less Than >= Greater Than or Equal to <= Less Than or Equal to == Equal to != Not euqal Every relational operator returns true or false. In C any non-zero is treated as true and zero is treated as false. In C if any expression evaluated true then system returns 1 otherwise return 0. Relational operator are evaluated from left to right. Example-1 printf("%d",5>2); //print 1 Example-2 printf("%d",5>2>1); //print 0 //first 5>2 evaluated true and returns 1 and then result of this expression is compared with next 1, that is evaluated false. Logical Operator &&(And) ||(Or) !(not) are the 3 logical operators. &&(and),

Popular posts from this blog

String in golang

Inline V/S Block Level Element

Arrays in C Language

Data Types in Go language

Printing in C programming

Variable Naming & Scope of Variable

Escape Sequence | Formatted Printing | Interview Questions

Floating point Data types in Go lang

Overview of Go lang

Literals in Java