17.3k views
5 votes
In an if…else statement, if the boolean expression is false:_________.

A) The first statement or block is executed
B) The statement or block following the default is executed
C) The statement or block following the else is executed
D) No statements or blocks are executed

User ByteDuck
by
3.2k points

2 Answers

2 votes

Answer:

C) The statement or block following the else is executed

Step-by-step explanation:

An if... else statement in computer programming languages uses boolean expressions that evaluate to true or false which is denoted by 1 or 0. A statement which evaluates to true such as" x=1" declaration and "if x==1"is a conditional statement that will have it's block executed and if false(not the example) will execute the" else" statement which is an alternative if the "if" boolean evaluates to false.

User TheDavidBarton
by
3.8k points
5 votes

Answer:

C) The statement or block following the else is executed

Step-by-step explanation:

In an if…else statement, if the boolean expression is false the statement or block following the else is executed.

User BenR
by
3.9k points