Gate2017 ss Q58

0. Consider the following C program.

 int main ( ) {
 int m = 10;
 int n, n1;
 n = ++m;
 n1 = m++;
  n--; --n1;
  n - = nl;
  printf (“%d”, n);
  return 0;
  })
  The output of the program is ______.

  • Option : A
  • Explanation :
    (will increment m & assign it to
    will assign m to n1 and then increment m by 1
    n --; decrement n by
    --n; decrement n by
    ∴ ‘0’ is printed)
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *