v Operators: - An operator is a symbol that tells or intimates to the compiler to perform specific calculations or manipulations on one or more operands. Operators are essential for performing computations and making decisions in programs. a + b is an operation a & b are operands + is an operator Based on number of operands involved: 1. Unary operators: - unary operators can be applied on only one operator. Example: - ++ , -- , - (unary minus) , sizeof , ~ (compliment) , ! (not). 2. Binary operators: - binary operators can be applied on two operands. Example: - + , -, * , / , etc. 3. Ternary operators: - Ternary operator can be applied on three operands. Example: - ?: (ternary conditional operator). C supports several operators, can be classified into following...
Arrays: - An array is a collection of elements of the same data type stored in contiguous memory locations. It is a derived data type and a homogenous data structure. It is a variable which can store multiple values of the same type under a single variable name, making it easier to manage and manipulate related data. The size of an array is fixed. To access the elements of an array, we use indexes or subscripts accordingly. array index or subscript is used to identify array elements address. Array index or subscript starts with 0 to n-1. Declaration of an array: - The declaration of an array means telling the compiler to create an array variable and reserving memory for a fixed number of elements of the same data type. Initialization of an array: - Initializing an array means assigning initial values to its elements. Types of arrays: - Arrays are classified based on the number of dimensions they have: ...