Home / General Knowledge / Testing New :: Discussion

Discussion :: Testing New

  1. Determine Output:

    void main()

    {

    int i=0, j=0;

    if(i && j++)

    printf("%d..%d", i++, j);

    printf("%d..%d", i, j);

    }

  2. A.

     0..1

    B.

     1..0

    C.

     0..0

    D.

     1..1

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    The value of i is 0. Since this information is enough to determine the truth value of the boolean expression. So the statement following the if statement is not executed. The values of i and j remains unchanged and get printed.


Be The First To Comment