What is the difference between IF-THEN-ELSE-END IF and IF-THEN-ELSIF- END IF statements?
What will be an ideal response?
The IF…THEN…ELSE…END IF statement provides action statements for the TRUE
outcome as well as the FALSE outcome.
The IF…THEN…ELSIF…END IF statement is an extension to the previous
statement. When you have many alternatives/options, you can use previously explained
statements, but the ELSIF alternative is more efficient than the other two.
You might also like to view...
Which of the following is false about the new operator and the object for which it allocates memory?
a. It calls the object’s constructor. b. It returns a pointer. c. It does not require the size of the object to be explicitly specified in the new expression. d. It automatically destroys the object after main is exited.
What does the expression x %= 10 do?
a. Adds 10 to the value of x, and stores the result in x. b. Divides x by 10 and stores the remainder in x. c. Divides x by 10 and stores the integer result in x. d. None of the above.