About Me

Hello there! Before talking about qualifications and professional abilities, I would like to introduce myself. I am a Yuvraj Basnet and professional software developer and have been working in this field for 3 long years. I have finished my graduation from The University of Delhi on Computer Science Engineering I considered myself a reasonably experienced programmer with a particular interest in the human side of software development, computers are fascinating machine, but they're mostly reflection of the people using them. In the art of software development, studying code isn't enough; you have to study the people behind the software, too.

PART II OPERATORS IN C

In the previous tutorial I will explain you operators now in this tutorial you learn 
others operators in c programming.




2)RELATIONAL OPERATORS:

Relational operators are those operators which is for comparision of two

operands and return the result in 1 and 0.


    Example-
    
   OUTPUT
    

3)LOGICAL OPERATORS:
It is most often used to test whether a certain condition between the 
statements or value is true or false.

   Example-

   OUTPUT



4)BITWISE OPERATORS:
During computation of variables, mathematical operations like: addition, 
subtraction, addition and division are converted into bit-level and 
1's and 0's is known as bitwise operator.
   Example-

    OUTPUT
 

5)OTHER OPERATORS USE IN C:
i)Comma operatorComma operators are used to link related expressions
  together. For example int a, b=4, c;

ii)Size of operator: The size of operator is a unary operator which return 
    the size of data (array ,variable ,constant e.t.c).

Example-

    OUTPUT

6)TERNARY OPERATOR:
Ternary operator is a conditional operator that works on 3 operands.

Conditional Operator Syntax:

conditonalExpression ? expression1 : expression2;  

PRECEDENCE OF OPERATORS-   
If more than one operator are involved in an expression, C 
language has a predefined rule of priority for the operators. 
This rule of priority of operators is called operator precedence.

Example-

   OUTPUT

ASSOCIATIVITY OF OPERATORS:
if two operators of same precedence (priority) is present in 
an expression, Associativity of operators indicate the order 
in which they execute.

         Summary of C operators with precedence and associativity

Post a Comment

0 Comments