Skip to content
Related Articles

Related Articles

Improve Article

GATE | GATE CS 2021 | Set 1 | Question 60

  • Last Updated : 24 May, 2021
Geek Week

Consider the following C code segment:

a = b + c;
e = a + 1;
d = b + c;
f = d + 1;
g = e + f; 

In a compiler, this code segment is represented internally as a directed acyclic graph (DAG). The number of nodes in the DAG is _____________ .
(A) 6
(B) 12
(C) 7
(D) 10


Answer: (A)

Explanation: DAG will be,

The number of nodes in the DAG is 6.

Quiz of this Question

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :