ankitweblogic logo
W e b t u t o r i a l s

C Tutorial

Programing Approach

Algorithm

Flow Chart

Define C

Define Programming

C - Syntax

Compiler vs Interpreter

C - Variables

C - Keywords

C - Data Types

C - Comments

Turbo C - Shortcut keys

C - Operators

Hierarchy of Operators

Ex: Arithmetic Operator

C - Formatting Output

Constant Variable

C - Escape Sequence

C - if , switch

Ex: If condition

Ex: Inc / Dec Operator

C - loops

Ex: Loops

C - Nesting Of loops

Ex: Nested Loops

Jumping Statements

C - Arrays 1D

C - Arrays 2D

C - Sorting

ASCII Value

Character I/O Function

C - String Functions

Ex: Strings

Array of Strings

C - Math Functions

User-defined Function

Exercise Function

C - Types of Functions

Storage Class

C - Header Files

C - Preprocessor

C - Pointers

C - Structures

C - Typedef

C - File Handling

Ex: File Handling

Command Line Argument

MCQ

Hierarchy of operators

The Priority or Precedence in which the operators are performed is called the Hierarchy of operators. The associativity specifies the operators direction to be evaluated, it may be left to right or right to left.

PRIORITY OPERATORS
1. ( ) , ++ , --
2. * / %
3. + -
4. < , > , <= , >=
5. == , !=
6. &&
7. ||
8. =

Parentheses have the highest priority. If there are more than one set of parentheses than the inner most parentheses would performed first.

Example 1: 10 + 20 * 2
In the above example, multiply operator has greater precedence than + operator, so, it will execute first than + will be executed. The above expression result is 50.

Example 2: a * b / c
In the above equation * and / are of same priority. So, equation is start from left to right. First multiplication is performed than division.

Example 3: a = b = 5;
Here, it starts from right to left..