GATE CS 2025 (Forenoon) — Question 34

Programming in CPointers, Multi-Dimensional Arrays, StructuresNAT1 markEasy

c
1#include <stdio.h>
2void foo(int *p, int x) {
3    *p = x;
4}
5int main( ) {
6    int *z;
7    int a = 20, b = 25;
8    z = &a;
9    foo(z, b);
10    printf("%d", a);
11    return 0;
12}
13
The output of the given C program is ________. (Answer in integer)
Practise the full 2025-FN 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