Home / C Programming / Operators and Expressions :: Discussion

Discussion :: Operators and Expressions

  1. Choose the correct output for the following program.

    #include<stdio.h>

    void main()

    {

    int a=10, b=11, c=13, d;

    d = (a=c, b+=a, c=a+b+c);

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

    }

  2. A.

     50, 13, 11, 13

    B.

     50, 13, 24, 50

    C.

     13, 10, 24, 50

    D.

     50, 13, 24, 13

    E.

     13, 13, 24, 13

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    For any comma separated expression the outcome is the right most part.


Be The First To Comment