Skip to content
Early access — you're among the first to try PYQLabs. Share feedback
Concept drill

output

GATE CSE & IT · Data Structures · 2000-2026

14
PYQs
86%
keyed
0
elite explanations
7
years appeared

Study anchor

Source-book anchor pending for this concept.

Practice action

Start latest PYQ

PYQs in this concept

All concepts →
2026 PYQ

Consider the following program in C: #include <stdio.h> void func(int i, int j) { if(i < j) { int i = 0; while (i < 10) { j += 2; i++; } } printf("%d", i); } int main() { int i = 9...

easybasic explanation
2025 Q34

#include 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 __________. (...

mediumanswer key
2025 Q62

Consider the following C program: #include int main() { int a; int arr[5] = {30,50,10}; int *ptr; ptr = &arr[0] + 1; a = *ptr; (*ptr)++; ptr++; printf("%d", a + (*ptr) + arr[1]); r...

mediumanswer key
2025 Q63

Consider the following C program: #include int g(int n) { return (n+10); } int f(int n) { return g(n*2); } int main(){ int sum, n; sum=0; for (n=1; n<3; n++) sum += g(f(n)); printf...

mediumanswer key
2025 PYQ

Consider the following C program : #include <stdio.h> int main( ) { int a; int arr[5]={30,50,10}; int *ptr; ptr = &arr[0] + 1; a = *ptr; (*ptr)++; ptr++; printf("%d",a + (*ptr) + a...

easybasic explanation
2024 Q13

Consider the following C program. Assume parameters to a function are evaluated from right to left. #include int g(int p) { printf("%d", p); return p; } int h(int q) { printf("%d",...

mediumanswer key
2024 Q18

Consider the following C program: #include int main() { int a = 6; int b = 0; while (a < 10) { a = a / 12 + 1; a += b; } printf("%d", a); return 0; } Which one of the following sta...

mediumanswer key
2024 Q19

Consider the following C program: #include void fX(); int main() { fX(); return 0;} void fX() { char a; if((a=getchar()) != '\n') fX(); if (a != '\n') putchar (a); } Assume that th...

mediumanswer key
2024 Q36

What is the output of the following C program? #include int main() { double a [2]={20.0, 25.0}, *p, *q; p = a; q = p + 1; printf("%d,%d", (int)(q - p), (int)(*q - *p)); return 0;}

mediumanswer key
2024 PYQ

What is the output of the following C program? #include <studio.h> int main() { double a[2]={20.0, 25.0}, *p, *q; p = a; q = p + 1; printf("%d,%d", (int)(q - p), (int)(*q - *p)); r...

easyanswer keybasic explanation
2022 PYQ

What is printed by the following ANSI C program? #include <stdio.h> int main(int argc, char *argv[ ]) { int x = 1, z[2] = {10, 11}; int *p = NULL; p = &x; *p = 10; p = &z[1]; *(&z[...

easyanswer keybasic explanation
2017 Q54

Consider the following C Program. #include int main() { int m = 10; int n, nl; n = ++m; n1 = m++; n--; --nl; n -= nl; printf("%d", n); return 0; } The output of the program is ____...

mediumanswer key
2012 PYQ

Consider the following C code segment. int a, b, c = 0; void prtFun(void); main( ) { static int a = 1; /* Line 1 */ prtFun(); a + = 1; prtFun(); printf("\n %d %d ", a, b); } void p...

mediumanswer key
2000 PYQ

The value of j at the end of the execution of the following C program int incr (int i) { static int count = 0; count = count + i; return (count); } main () { int i,j; for (i = 0; i...

easyanswer key