What will be the value of i for the following expression : int f=11, i=3 ; i+=…

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

What will be the value of i for the following expression : int f=11, i=3 ; i+= (f >3) ? i & 2:5 ;

  1. A.

    2

  2. B.

    5

  3. C.

    13

  4. D.

    12

Attempted by 34 students.

Sign up free to check your answer

Sign up free

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…