GATE CS 2021 (Forenoon) — Question 60

Compiler DesignIntermediate Code Generation & Local Code OptimizationNAT2 marksMedium

Consider the following C code segment:
c
1a = b + c;
2e = a + 1;
3d = b + c;
4f = d + 1;
5g = e + f;
6
In a compiler, this code segment is represented internally as a directed acyclic graph (DAG). The number of nodes in the DAG is _________.
Practise the full 2021-FN paper
Challenge a friend: WhatsApp Telegram
Recommended book · affiliate linkCompilers: Principles, Techniques & ToolsThe "Dragon Book" for parsing, syntax-directed translation and code generation.
Practise more on Intermediate Code Generation & Local Code OptimizationTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group