- What is operator in C.
- What are the different types of operator in C.
- What is the use of sizeof() operator in C
What is operator in C
An operator in C is a symbol used to perform logical and mathematical operations in a C program. C operators connects constants and variables to form expressions.
For Example
2 x (length + breadth);
x and + are operators
2 is a constant
length and breadth are variables
“2x(length + breadth)” is an expression, performing one logical task.
What are the different types of operator in C
C programming language is rich in built in operators. Here is the list of operators supported by C language.
- Arithmetic Operators
- Assignment Operators
- Bitwise Operators
- Logical Operators
- Relational Operators
- Conditional Operator
- Special Operators
What is the use of sizeof() operator in C
The sizeof is a compile time operator not a standard library function. The sizeof is a unary operator which returns the size of passed variable or data type in bytes. As we know, that size of basic data types in C is system dependent, So we can use sizeof operator to dynamically determine the size of variable at run time.