C Language Archive

Assignment Operators in C

Assignment operator: Operator is ‘=’ It is used to assign value to variable. Variable = Value; We can assign values directly or using variables or evaluating expressions or through function return values as follows.

C Arithmetic operators

Arithmetic operators: Operators are : +, – , * , / , % Operators are used to perform all arithmetic operations. Operators follow BODMAS rule for priorities. / – operator returns quotient value after division …

C Conditional operator

Conditional operator: It is a ternary operator. Hence it performs operation on 3 operands. The operator is  ” ? : ”   In Conditional operator if “Condition is true” then executes <expression1> else executes <expression2> Syntax: …

C Relational Operators

Relational operators: Operators are >, <, >=, <=, ==, != These are binary operators. These operators returns a true(1) or false(0) by validating the relation among operands. Relational operators execute after modify operators: Modify operator …

C Modify Operators

Modifying operators: Modify operators also called unary operators. Modify operators are Increment and Decrement operators. Increment operator increase the value of variable by 1 Decrement operator decrease the value of variable by 1 Increment operators …

C programs on Modify operators

Crack the code: ‘x’ value will be modified after substitution into expression as it was post-increment. Crack the code: ‘x’ value increment 2 times and the final value will be substituted into expression. Crack the …

C Logical Operators

Logical operators: These are binary operators These operators return a true or false by evaluating more than 1 expression Operators are Logical AND (&&) Logical OR (||) Logical NOT (!) We can find the return …

C Bitwise operators

Bitwise Operators: Bitwise operators are used to manipulate the data at bit level. They can be applied only to char and int types. The operators are Bitwise – AND (&) Bitwise – OR (|) Bitwise …

C Shift Operators

Shift Operators: The bitwise shift operators move the bit values in the memory location. The left operand specifies the value to be shifted. The right operand specifies the number of positions that the bits in …

C Compound Assignment operators

Compound assignment operators: Compound assignment operators are a kind of assignment operators. For every binary operator, we can write compound assignment operator. Operators are +=, -=, *=, /=, &=, >>= , <<= …. These operators …

Courses Enquiry Form