GATE CS 2025 (Afternoon) — Question 62

Programming in CPointers, Multi-Dimensional Arrays, StructuresNAT2 marksMedium

Consider the following C program:
c
1#include <stdio.h>
2int main( ) {
3    int a;
4    int arr[5] = {30, 50, 10};
5    int *ptr;
6    ptr = &arr[0] + 1;
7    a = *ptr;
8    (*ptr)++;
9    ptr++;
10    printf("%d", a + (*ptr) + arr[1]);
11    return 0;
12}
13
The output of the above program is ________. (Answer in integer)
Practise the full 2025-AN paper
Challenge a friend: WhatsApp Telegram
From RENYXERAThis week's 10-question challengeSame 10 past-GATE questions for everyone this week — see where you stand.
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