COMPILER DESIGN

ADVANCED TOPICS IN COMPILER DESIGN

CODE GENERATION FOR OBJECT ORIENTED LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Jackson has written a section of code in his program that instructs a character to move forward unless it encounters an obstacle, such as a rock. If the character encounters an obstacle, then it should change direction before moving forward again. If it does not encounter an obstacle, it should continue moving forward. Which type of control structure has Jackson written?
A
Selection
B
Loop
C
Functional
D
Sequence
Explanation: 

Detailed explanation-1: -Computational thinking involves breaking down a problem into smaller parts and finding a repeatable path that the computer can understand and execute to get the desired solution. Basically, it involves making algorithms to perform the given tasks.

Detailed explanation-2: -Sequence is the default control structure; instructions are executed one after another.

There is 1 question to complete.