# Hierarchy of Operators Revisited in C

Rate this post

Since we have now added the logical operators to the list of operators we know, it is time to review these operators and their priorities.

The higher the position of an operator is in the table, higher is its priority.

The following figure summarizes the working of all the three logical operators.

## Related Posts

• 77
In this article we will learn about the NOT operator, written as !. This operator reverses the result of the expression it operates on. For example, if the expression evaluates to a non-zero value, then applying ! operator to it results into a 0. Vice versa, if the expression evaluates…
Tags: operator, example, logical, program, learn, programming, write, tutorial
• 75
C allows usage of three logical operators, namely, &&, || and !. These are to be read as ‘AND’ ‘OR’ and ‘NOT’ respectively. There are several things to note about these logical operators. Most obviously, two of them are composed of double symbols: || and &&. Don’t use the single…
Tags: program, logical, operators, three, operator, learn, write, programming, tutorial
• 68
Problem Statement: Write a program to calculate the salary as per the following table: Solution: /* C program to calculate salary */ main( ) { char g ; int yos, qual, sal ; printf ( "Enter Gender, Years of Service and Qualifications ( 0 = G, 1 = PG ):" )…
Tags: program, example, write, learn, tutorial, programming, basic
• 66
Like most languages, C uses the keyword if to implement the decision control instruction. The general form of if statement looks like this: if ( this condition is true )       execute this statement ; The keyword if tells the compiler that what follows is a decision control…
Tags: program, example, operators, operator, learn, programming, write, tutorial
• 65
Problem Statement: If a four-digit number is input through the keyboard, write a program to obtain the sum of the first and last digit of this number. Solution: /* Sum of 1st and last digit of a four digit number */ #include<stdio.h> #include<conio.h> main() { int n,a,sum=0; clrscr(); printf("\Enter a…
Tags: program, write, learn, example, tutorial, programming, basic

#### Satya Prakash

VOIP Expert: More than 8 years of experience in Asterisk Development and Call Center operation Management. Unique Combination of Skill Set as IT, Analytics and operation management.