A number of basic blocks = Number of leaders. Because every basic block will contain 1 leader.
Now, how to find a leader?
- The first statement is a leader.
- The target of a goto is a leader.
- The next statement after goto is a leader.
So here in this question the number of leaders in the given control flow graph =9, which are 1,3,4,5,7,9,10,11,13.
The number of basic blocks from the given code is =9.