Skip to main content

Posts

Showing posts with the label C Operators and Expressions

C Operators , precedence and Expressions

C – Operators and Expressions The symbols which are used to perform logical and mathematical operations in a C program are called C operators. These C operators join individual constants and variables to form expressions. Operators, functions, constants and variables are combined together to form expressions. Consider the expression A + B * 5. where, +, * are operators, A, B are variables, 5 is constant and A + B * 5 is an expression. Types of C operators: C language offers many types of operators. They are, Types of Operators Description Arithmetic operators These are used to perform mathematical calculations like addition, subtraction, multiplication, division and modulus Assignmentoperators These are used to assign the values for the variables in C programs. Relational operators These operators are used to compare the value of two variables. Logical operators These operators ar