- An expression is a sequence of operators and operands that specifies computation of a value.
- An expression may consist of single entity or some combination of such entities interconnected by one or more operators.
- All expression represents a logical connection that’s either true or false.
- Thus logical type expression actually represents numerical quantities.
In C every expression evaluates to a value i.e., every expression results in some value of a certain type that can be assigned to a variable. Some examples of expressions are shown in the table given below.
C – EXPRESSIONS EXAMPLE PROGRAM :
int a=123 , b;
printf(“Value of a = %d\n”,a);
printf(“Value of b =%d”,b);
|Value of a = 123
Value of b = 125