What are operators in C?
a) Symbols that perform operations
b) Variables
c) Functions
d) Data types
Answer:
a) Symbols that perform operations
Explanation:
Operators in C are symbols that perform operations on variables and values. The most common types of operators include arithmetic operators (e.g., +
, -
, *
, /
), relational operators (e.g., ==
, !=
, <
, >
), and logical operators (e.g., &&
, ||
, !
). Operators are used to manipulate data and variables, enabling the program to perform calculations, comparisons, and logical operations.
Understanding and correctly using operators is fundamental to controlling the logic and flow of a C program. They allow the programmer to perform tasks such as mathematical computations, decision-making, and data manipulation efficiently.