it will have 4 edges and 4 nodes.

The Gateway to Computer Science Excellence

+1 vote

Consider the intermediate code given below:

The number of nodes and edges in the control-flow graph constructed for the above code, respectively are *X* and *Y*. The value of *X* + *Y* is ________.

0

yes.Although i selected wrong and later got 4 and 4 but ehy have given 5 and 5,which does not seem corr

ect

ect

0

how you are getting 4 nodes

here are only 2 basic blocks possible a

block A , block B

(A) a=10

(A) b=15

(B) a= a+b

(B) b = a-b

(B) a = a-b

(B) if a==b goto 3

so answer should be 4 (2 nodes and 2 edges)

here are only 2 basic blocks possible a

block A , block B

(A) a=10

(A) b=15

(B) a= a+b

(B) b = a-b

(B) a = a-b

(B) if a==b goto 3

so answer should be 4 (2 nodes and 2 edges)

0

@Lone Wolf answer is 4 nodes and 4 edges, because you didn't consider start and end nodes and their respective edges.

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.5k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.3k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.1k
- Non GATE 1.5k
- Others 1.5k
- Admissions 595
- Exam Queries 576
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 17

50,648 questions

56,429 answers

195,208 comments

99,921 users