GATE | Sudo GATE 2020 Mock III (24 January 2019) | Question 42
Consider the following C program:
#include<stdio.h>
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 ______.
(A) 0
(B) 1
(C) -2
(D) None of these.
Answer: (C)
Explanation: Option (C) -2 is correct: https://ide.geeksforgeeks.org/FaZIspWPX0
Quiz of this Question
Last Updated :
22 Jan, 2020
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...