Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

GATE | GATE-CS-2017 (Set 2) | Question 42

  • Difficulty Level : Basic
  • Last Updated : 13 Aug, 2021

Consider the following C program:

#include 
int main()
{
    int m = 10;
    int n, n1;
    n = ++m;
    n1 = m++;
    n--;
    --n1;
    n -= n1;
    printf("%d",n);
    return 0;
}

The output of the program is ______.

Note: This questions appeared as Numerical Answer Type.
(A) 0
(B) 1
(C) 2
(D) 3


Answer: (A)

Explanation: http://code.geeksforgeeks.org/cWm5wo
Gate_set2_42



Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!