Home / C Programming / Operators and Expressions :: Operators and Expressions

C Programming :: Operators and Expressions

  1. Which operator from the following has the lowest priority?

  2. A.

     Assignment operator

    B.

     Division operator

    C.

     Comma operator

    D.

     Conditional operator

    E.

     Unary-operator

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Identify the correct output of the following code:

    void main()

    {

    int w=10, x=5, y=3, z=3;

    if( (w < x ) && (y=z++) )

    printf("%d %d %d %d", w, x, y, z);

    else

    printf("%d %d %d %d", w, x, y, z);

    }

  4. A.

     10 5 4 4

    B.

     10 5 3 3

    C.

     10 5 4 3

    D.

     10 5 3 4

    E.

     10 5 5 5

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. Given b=110 and c=20, what is the value of 'a' after execution of the expression a=b-=c*=5?

  6. A.

     450

    B.

     10

    C.

     110

    D.

     -10

    E.

     -110

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. void main()

    {

    int a=10, b;

    b = a++ + ++a;

    printf("%d %d %d %d", b, a++, a, ++a);

    }

    what will be the output when following code is executed?

  8. A.

     12 10 11 13

    B.

     22 12 12 13

    C.

     22 11 11 11

    D.

     22 14 12 13

    E.

     22 13 14 14

    View Answer

    Workspace

    Discuss Discuss in Forum