Solved

Which of the Following Statements Is Correct About an If

Question 12

Multiple Choice

Which of the following statements is correct about an if statement?


A) You must use braces if the body of an if statement contains only a single statement.
B) You can omit an else statement if there is no task defined in the else branch.
C) You cannot use braces if the body of an if statement contains only a single statement.
D) The number of opening braces can be different from the number of closing braces.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents