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

Symbol Tables & Storage

GATE CSE & IT · 41 questions across 26 years (1990-2026) · 65% recurrence rate

Recurrence sparkline

19902026
199020082026

Difficulty mix

easy 66%
med 32%
hard 2%

Question types

MCQ30
NAT4
STMT4
MTF3

All 41 questions on Symbol Tables & Storage

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, j = 10; func(i, j); return 0; } The ou...

Easy
2026 PYQ

In C runtime environment, which one of the following is stored in heap?

Easy
2025 PYQ

Which ONE of the following statements is FALSE regarding the symbol table?

Easy
2024 PYQ

Consider the following C program: #include <stdio.h> void fX(); int main() { fX(); return 0;} void fX() { char a; if ((a = getchar()) != '\n') fX(); if (a != '\n') putchar(a);} Assume that the input to the program from t...

Easy
2023 PYQ

Consider the following program: int main ( ) { f1( ); f2(2); f3( ); return (0); } int f1( ) { return (1); } int f2 (int X) { f3( ); if (X==1) return f1 ( ); else return (X*f2(X$$-$$1)); } int f3( ) { return (5); } Which...

Easy📊
2023 PYQ

The integer value printed by the ANSI-C program given below is ___________. #include<stdio.h> int funcp(){ static int x = 1; x++ ; return x; } int main(){ int x,y; x = funcp(); y = funcp()+x; printf("%d\n", (x+y)); retur...

Easy
2021 PYQ

Consider the following statements. S 1 : The sequence of procedure calls corresponds to a preorder traversal of the activation tree. S 2 : The sequence of procedure returns corresponds to a postorder traversal of the act...

Easy
2020 PYQ

Consider the following statements. I. Symbol table is accessed only during lexical analysis and syntax analysis. II. Compilers for programming languages that support recursion necessarily need heap storage for memory all...

Easy
2020 PYQ

Consider the following C functions. int fun1 (int n) { static int i = 0; if (n > 0) { ++i; fun1(n-1); } return (i); } ___________________ int fun2 (int n) { static int i = 0; if (n > 0) { i = i + fun1 (n); fun2(n-1); } r...

Med
2019 PYQ

Consider the following C program : #include<stdio.h> int r() { static int num=7; return num--; } int main() { for(r();r();r()) printf("%od ",r()); return 0; } Which one of the following values will be displayed on execut...

Med
2016 PYQ

Consider the following C program. #include < stdio.h > void mystery(int *ptra, int *ptrb) { int *temp; temp = ptrb; ptrb = ptra; ptra = temp; } int main() { int a=2016, b=0, c=4, d=42; mystery(&a, &b); if (a < c) mystery...

Easy
2014 PYQ

Which of the following statements are CORRECT? 1) Static allocation of all data areas by a compiler makes it impossible to implement recursion. 2) Automatic garbage collection is essential to implement recursion. 3) Dyna...

Med
2014 PYQ

Consider the C function given below. int f(int j) { static int i = 50; int k; if (i == j) { printf("something"); k = f(i); return 0; } else return 0; } Which one of the following is TRUE ?

Easy
2013 PYQ

What is the return value of f (p, p), if the value of p is initialized to 5 before the call? Note that the first parameter is passed by reference, whereas the second parameter is passed by value. int f (int &x, int c) {...

Med
2012 PYQ

Consider the program given below, in a block-structured pseudo-language with lexical scoping and nesting of procedures permitted. Program main; Var . . . Procedure A1; Var . . . Call A2; End A1 Procedure A2; Var . . . Pr...

Med📊
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 prtFun(void) { static int a=2; /* Line 2...

Med
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 prtFun(void) { static int a=2; /* Line 2...

Med
2010 PYQ

Which languages necessarily need heap allocation in the runtime environment?

Easy
2010 PYQ

Which data structure in a compiler is used for managing information about variables and their attributes?

Easy
2008 PYQ

Which of the following are true? I. A programming language which does not permit global variables of any kind and has no nesting of procedures/functions, but permits recursion can be implemented with static storage alloc...

Med
2008 PYQ

Which of the following are true? I. A programming language which does not permit global variables of any kind and has no nesting of procedures/functions, but permits recursion can be implemented with static storage alloc...

Med
2007 PYQ

Consider the following C function: int f(int n) { static int r = 0; if(n <= 0) return 1; if(n>3) { r = n; return f(n-2)+2; } return f(n-1)+r; } What is the value of f(5)?

Med
2005 PYQ

Consider the following C program: void foo (int n, int sum) { int k = 0, j = 0; if(n==0) return; k=n%10; j = n /10; sum = sum + k; foo(j, sum); printf("%d",k); } int main () { int a = 2048, sum = 0; foo(a, sum); printf("...

Easy
2004 PYQ

Consider the following C function: int f(int n) { static int i = 1; if(n>=5) return n; n = n+1; i++; return f(n); } The value returned by f(1) is

Easy
2003 PYQ

The following program fragment is written in a programming language that allows global variables and does not allow nested declarations of functions. global int i = 100, j = 5; void P(x) { int i = 10; print(x + 10); i =...

Hard
2003 PYQ

Consider the C program shown below. #include < stdio.h > #define print(x) printf("%d ", x) int x; void Q(int z) { z += x; print(z); } void P(int *y) { int x = *y+2; Q(x); *y = x-1; print(x); } main(void) { x = 5; P(&x);...

Med
2003 PYQ

The following program fragment is written in a programming language that allows global variables and does not allow nested declarations of functions. global int i = 100, j = 5; void P(x) { int i = 10; print(x + 10); i =...

Med
2001 PYQ

Consider the following program Program P2 var n:int; procedure W(var x:int) begin x=x+1; print x; end procedure D begin var n:int; n=3; W(n); end begin \\begin P2 n = 10; D; end If the language has dynamic scooping and p...

Med
2001 PYQ

Consider the following three C functions: [P1] int*g(void) { int x=10; return(&x); } [P2] int*g(void) { int *px; *px = 10; return px; } [P3] int*g(void) { int *px px =(int*)malloc (size of (int)); *px = 10; return px; }...

Easy
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 <= 4; i++) j = incr(i); } is

Easy
1999 PYQ

Consider the following program in a language that has dynamic scooping: var x: real; procedure show; begin print(x); end; procedure small; var x: real; begin x: = 0.125; show; end; begin x:=0.25; show; small end; Then th...

Easy
1998 PYQ

Faster access to non-local variables is achieved using an array of pointers to activation records called a

Easy
1997 PYQ

Given the following Pascal like program segment: Procedure A; x,y:intger; Procedure B; x,z:real; S1 end B; Procedure C; i:integer; S2; end C; end A; The variables accessible in S1 and S2 are

Easy
1997 PYQ

Heap allocation is required for languages.

Easy
1996 PYQ

The pass numbers for each of the following activities (i) object code generation (ii) literals added to literal table (iii) listing printed (iv) address resolution of local symbols that occur in a two pass assembler resp...

Easy
1996 PYQ

The correct matching for the following pairs is List - I (A) Activation record (B) Location counter (C) Reference counts (D) Address relocation List - II (1) Linking loader (2) Garbage collection (3) Subroutine call (4)...

Easy
1995 PYQ

A linker is given object modules for a set of programs that were compiled separately. What information need to be included in an object module?

Easy
1995 PYQ

What is the value of X printed by the following program? program COMPUTE (input, output); var X:integer; procedure FIND (X:real); begin X:=sqrt(X); end; begin X:=2 Find(X) Writeln(X) end

Easy
1991 PYQ

Indicate the following statement true or false : A programming language not supporting either recursion or pointer type does not need the support of dynamic memory allocation.

Easy
1990 PYQ

Match the followings: Group-I (a) Pointer data type (b) Activation Record (c) Repeat -Until (d) Coercion Group-II (p) Type Conversion (q) Dynamic Data Structure (r) Recursion (s) Nondeterministic loop

Easy
1990 PYQ

Match the pairs in the following: List - I (A) Pointer data type (B) Activation record (C) Repeat-until (D) Coercion List - II (p) Type conversion (q) Dynamic data structure (r) Recursion (s) Nondeterministic loop

Easy