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

Code Generation

GATE CSE & IT · 14 questions across 12 years (1989-2024) · 30% recurrence rate

Recurrence sparkline

1989–2024
198920072024

Difficulty mix

easy 43%
med 57%

Question types

MCQ13
NAT1

All 14 questions on Code Generation

2024 PYQ

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

Easy✓
2023 PYQ

Consider the following statements regarding the front-end and back-end of a compiler. S1: The front-end includes phases that are independent of the target hardware. S2: The back-end includes phases that are specific to t...

Easy✓
2015 PYQ

The output of the following C program is__________. void f1(int a, int b) { int c; c=a; a=b; b=c; } void f2(int *a, int *b) { int c; c=*a; *a=*b; *b=c; } int main(){ int a=4, b=5, c=6; f1(a,b); f2(&b, &c); printf(“%d”,c-...

Easy
2010 PYQ

What does the following program print? #include < stdio.h > void f (int *p, int *q) { p = q; *p = 2; } int i = 0, j = 1; int main ( ){ f(&i, &j); printf ("%d %d \ n", i, j); return 0; }

Easy✓
2004 PYQ

Consider the following C function: void swap (int a, int b) { int temp; temp = a; a = b; b = temp; } In order to exchange the values of two variables x and y.

Easy✓
2004 PYQ

Consider the grammar rule $$E \to {E_1} - {E_2}$$ for arithmetic expressions. The code generated is targeted to a CPU having a single user register. The subtraction operation requires the first operand to be in the regis...

Med✓
2003 PYQ

Which of the following is NOT an advantage of using shared, dynamically linked libraries as opposed to using statically linked libraries?

Med✓
2002 PYQ

The results returned by function under value-result and reference parameter passing conventions

Med✓
2001 PYQ

What is printed by the print statements in the program P1 assuming call by reference parameter passing? Program P1() { x=10; y=3; func1(y,x,x); print x; print y; } func1(x,y,z) { y=y+4; z=x+y+z; }

Med✓
2001 PYQ

The process of assigning load addresses to the various parts of the program and adjusting the code and date in the program to reflect the assigned addresses is called

Easy✓
1998 PYQ

What is the result of the following program? program side-effect (input, output); var x, result: integer: fucntion f (var x:integer):integer; begin x:x+1;f:=x; end begin x:=5 result:=f(x)*f(x) writeln(result) end

Med✓
1994 PYQ

In which one of the following cases is it possible to obtain different results for call-by-reference and call-by-name parameter passing methods?

Med✓
1991 PYQ

Indicate the following statement true or false: Although C does not support call by name parameter passing, the effect can be correctly simulated in C.

Med✓
1989 PYQ

In which of the following cases it is possible to obtain different results for call-by-reference and call-by-name parameter passing?

Med✓