GATE Assistant

Past questions › Computer Science and Information Technology › GATE 2025 set1

GATE 2025 set1 · CS · NAT · 1 mark · Programming and Data Structures › C Programming Fundamentals

GATE 2025 set1 Computer Science and Information Technology question: code The output of the given C program is . (Answer in integer)

#include <stdio.h>
void foo(int *p, int x){
    *p=x;
}
int main(){
    int *z;
    int a = 20, b = 25;
    z = &a;
    foo(z,b);
    printf("%d",a);
    return 0;
}

The output of the given C program is __________. (Answer in integer)

Show answer

Official answer: 25

Practise this question with exam-style marking

Discussion

No discussion yet.

Join the discussion