Consider the following statements: Int i=4, j=3, k=0; k = ++i - --j + i++ -…

PYQ UGC NET 2004Modified — slightly modified from the official paper; see the solution

Consider the following statements: Int i=4, j=3, k=0; k = ++i - --j + i++ - --j + j++; What will be the values of i, j and k after the statement?

  1. A.

    7, 2, 8

  2. B.

    5, 2, 10

  3. C.

    6, 2, 8

  4. D.

    Undefined behavior

Attempted by 41 students.

Sign up free to check your answer

Sign up free

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…