C Programming Operator Precedence

C Programming Operator Precedence

C Programming Operator Precedence

C Programming Operator Precedence

In this chapter you will learn about order of operators. Operators in C programs work in a predetemined order.

Operator Precedence in C Programming

Operator precedence indicates the order in which operator will work first and which operator will work later in C program. The associativity operators direct the determination. It can be left to right or right to left.

Let’s try to understand operator precedence with the help of the following example:

				
					int count=20+20*10;
				
			
c programming continue statement

Here the value of count variable is 220 because count = multiplication operator(20*10) is evaluated before + addition operator

Precedence and associativity in C programming are shown in the following table:

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *