Find the output of the following “C” code : Main ( ) { int x = 20, y = 35; x =…

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

Find the output of the following “C” code :

Main ( )

{ int x = 20, y = 35;

x = y++ + x++;

y = ++y + ++x;

printf (“%d, %d\n”, x, y);

}

  1. A.

    55, 93

  2. B.

    53, 97

  3. C.

    56, 95

  4. D.

    Undefined behavior

Attempted by 38 students.

Sign up free to check your answer

Sign up free

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…