Skip to main content

Posts

Showing posts with the label operators

Operators in C programming : Bitwise Operators

Bitwise Operator are used for manipulating data at bit level. These operators are used for testing the bits, or shifting them right or left. Bitwise The most common used unary operator is unary minus, where a numerical constant, variable expression is preceded by a minus sign. Unary minus operator is distinctly different from the arithmetic operator which denotes subtraction ( - ). The subtraction operator requires two separate operands. Several examples of unary minus operator -743                 - 0X7FFF                    -0.2                 -5E-8 -r00+1             - (x+y)                 ...

Operators in C programming : Assignment Operators

There are several different assignment operators in C. All of them are used to form assignment expressions which assign the value of an expression to an identifier. The most commonly used assignment operator is =. Assignment expressions that make use of the operator are written in the form: identifier = expression Where identifier generally represents a variable, and expression represents a constant, a variable or more complex expression.  Here are some typical assignment expressions that make use of the = operator. a = 3 x = y delta = 0.001 sum = a+b area = length * width Assignment operator = and equality operator = = are distinctly different. The assignment operator can be applied only to integer type signed or unsigned) and not to float or double. They are Operator                    Meaning &            ...

Operators in C programming : Logical operators

Operator                    Meaning &&                              And ||                                    Or !                                    Not Logical operators are used to compare & evaluate logical and relational expressions. Operator && is referred as logic and, the operator || is referred as logic or. The result of a logic and operation will be true only if both operands a...

Operators in C Programming : Relational and Logical Operators

Relational Operators are those that are used to compare two similar operands, and depending on their relation take some actions. The relational operators in C are listed as Operators                   Meaning <                                  less than <=                                less than or equal to >                                  greater than >=       ...

C Tokens(C programming Basics)

In a passage of text, individual words and punctuation marks are called tokens. Similarly, in a C program the smallest individual units are also known as C tokens. C has six types of tokens: 1. Identifiers e.g. x area __ temperature PI 2. Keywords e.g. int float for while 3. Constants e.g. -15.5 100 4. Strings e.g. “ABC” “year” 5. Operators e.g. + - * 6. Special Symbols e.g. ( ) [ ] { }