In order to form control flow graph we must form basic blocks of instructions and assign edges in between them to show the flow of program as per condition met.Some rules to form basic blocks:
1.start and end blocks are added to show beginning and ending of data flow .
2. first statement is always a beginning of new block.
3. goto expression(conditional/ unconditional branching) pointing to any statement, form a new basic block starting with respective target statement no.
4. statement that follows immediately a conditional/ unconditional expression reflects beginning of new block.
The solutions must have 8 ans as per these rules. Please find below image for solution: