GATE CS 2026, set 2 · Question 60 · Programming and Data Structures · Numerical answer (NAT) · 2 marks · no negative marks
Consider the following ANSI-C program.
#include <stdio.h> int main(){ int *ptr, a, b, c; a=5; b=11; c=20; ptr=&a; *ptr=c; ptr=&c; a=*(&b); c=*ptr-a; printf("%d",c); return(0); }
The output of this program is ______. ( answer in integer )
Note : Assume that the program compiles and runs successfully.
Answer
Answer 9
Answer from the official GATE CS 2026 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes