What is operator in C

Interview Questions
  • 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.


Related Topics
What is arithmetic operators in C
What is assignment operators in C
What is the relational operators in C
What is conditional operator and it's syntax in C
What is logical operator in C
What is bitwise operator in C
What is the difference between & and * operators in C
What is the use of goto statement in C
printf() function in C.
Write a c program to check whether is string is palindrome or not