GATE CS 2017 (Afternoon) — Question 54

Programming in CData Types, Syntax, Control Structures, LoopsNAT2 marksMedium

Consider the following C program
c
1# include <stdio.h>
2int main( )
3{
4    int m = 10;
5    int n, n1;
6    n = ++m;
7    n1 = m++;
8    n--;
9    --n1;
10    n -= n1;
11    printf("%d", n);
12    return 0;
13}
14
The output of the program is ________.
Practise the full 2017-AN paper
Challenge a friend: WhatsApp Telegram
Recommended book · affiliate linkCompilers: Principles, Techniques & ToolsThe "Dragon Book" for parsing, syntax-directed translation and code generation.
Practise more on Data Types, Syntax, Control Structures, LoopsTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group