by Dinesh Thakur Category: Operator

The sizeof operator is another method to determine the storage requirements of any data type of variable during the execution of a program. For example, we can use the expression.

by Dinesh Thakur Category: Operator

The C language provides four relational and two equality operators for comparing the values of expressions. The **relational operators **are *less than (*<), *greater than *(>), *less than or equal to (*<=) and *greater than or equal to *(>= ). The **equality operators **are *equal to *(==) and *not equal to ( ! *=). These operators are binary infix operators, i. e., they are used in the form *a op **b, *where *a *and bare operands (constants, variables or expressions) and *op *is a relational or an equality operator. Table summarizes these operators.

by Dinesh Thakur Category: Operator

There are five arithmetic operators, +, -, *, *I, *and %, which respectively represent the processes of addition, subtraction, multiplication, division, and modulus. The modulus operator (%) gives the remainder when one integer is divided by another integer. All of the five operators have been described with examples of codes in Table.

by Dinesh Thakur Category: Operator

The C language provides three **logical operators **that can be used to join relational and equality expressions and form complex **Boolean expressions, **i. e., expressions with operands having *true *or *false *values. These operators include *logical AND (&&), logical **OR *(||) and *logical **NOT *(!). They are summarized in Table.

by Dinesh Thakur Category: Operator

**Operators **are used to connect **operands, **i. e., constants and variables, to form **expressions.**

by Dinesh Thakur Category: Operator

The operator precedence and associativity rules specify the order in which operators in an expression are bound to the operands. These rules enable us to interpret the meaning of an expression in an unambiguous manner.

by Dinesh Thakur Category: Operator

**Arithmetic operators **are used to perform arithmetic operations on arithmetic operands, i. e., operands of integral as well as floating type. Recall that an integral type includes all forms of char and int types, whereas the floating-point types include the float, double and long double types. These operations include addition (+), subtraction (- ), multiplication (*), division (!), modulo arithmetic (%), increment (++), decrement (-- ), unary plus (+) and unary minus (- ). They can be grouped into three categories: *unary *operators, *multiplicative *operators and *additive *operators. The arithmetic operators are summarized in Table.

by Dinesh Thakur Category: Operator

The **conditional expression operator **(? :) is the only ternary operator in the C language. The conditional selection operator(? :) is more convenient to use than if-else provided there are only two options to choose from. It takes three operands and is used to evaluate one of the two alternative expressions depending on the outcome of a test expression as shown below.

by Dinesh Thakur Category: Operator

We have used the assignment operator (=), which is often called *equal to *in algebra. On the left of this operator we write the name of variable or l-value to which a value is to be assigned, and on right side we write the value to be assigned to it or r-value. The l-value is the memory segment in which the r-value is stored. Let A, B, and ch is the names of three variables declared as given below.

by Dinesh Thakur Category: Operator

The const qualifier tells the compiler that the variable's value should not be changed once it has been initialized. If we declare a const variable as

About Dinesh Thakur

Dinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.

Search Content

Popular Article

#### Define Operator, Operand, and Expression in 'C'

#### Which bitwise operator is suitable for checking whether a particular bit is ON or OFF

#### Define different types of Operators.

#### How does the prefix and postfix operator on expression

#### What is the functionality and restrictions of Modulus Operator

#### What is the difference between ++var and var++

#### Boolean Operators in C

#### What is Precedence of Operators

#### Bitwise Operators in C

#### Composite Assignment Operators in C

#### sizeof() operator in C

#### Relational and Equality Operators

#### Arithmetic Operators in C

#### Logical Operators in C

#### What is Operators in C language?

#### What is Precedence and Associativity of Operators?

#### What is conditional expression operator(ternary operator)?

#### What is Arithmetic operator in C language?

#### Assignment Operator in C

#### Const and volatile Qualifiers in C

Basic Courses

Advance Courses