GATE CS 2026 (Afternoon) — Question 60

Programming in CPointers, Multi-Dimensional Arrays, StructuresNAT2 marksMedium

Consider the following ANSI-C program.
c
1#include <stdio.h>
2int main( ) {
3    int *ptr, a, b, c;
4    a=5; b=11; c=20;
5    ptr=&a; *ptr=c; ptr=&c;
6    a=*(&b); c=*ptr-a;
7    printf("%d",c);
8    return(0);
9}
10
The output of this program is ________. (answer in integer) Note: Assume that the program compiles and runs successfully.
Practise the full 2026-AN paper
Challenge a friend: WhatsApp Telegram
From RENYXERAFree All-India Mock — every SundayA full GATE CS paper, exactly 180 minutes, ranked across India with your GATE score.
Practise more on Pointers, Multi-Dimensional Arrays, StructuresTimed, 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