What is the primary role of the else block in a conditional statement?

  • To define a new condition
  • To define the default action
  • To end the statement
  • To specify the condition
The primary role of the 'else' block in a conditional statement is to define the default action to be taken when none of the preceding conditions is true. It provides an alternative execution path.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *