expression

Expression in C

Expression in C

An expression is a combination of variables, constants and operators written according to the syntax of C language. 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.

Types of Expression

Type

Explanation

Example

Infix

Expression in which Operator is in between Operands

a + b

Prefix

Expression in which Operator is written before Operands

+ a b

Postfix

Expression in which Operator is written after Operands

a b +


Evaluation of Expressions :-

Expressions are evaluated using an assignment statement of the form

Variable = expression;

 
This website was created for free with Own-Free-Website.com. Would you also like to have your own website?
Sign up for free