2 answers
if (condition) instruction;
Mr C.
· 20 Jun 2022
Report
Was this answer helpful?
Thanks for the feedback.
Sign up free to save answers and ask your own doubts
Answer: if (condition) statement; or, for several statements, if (condition) { statements; }
if (condition)
{
statement-block; /* runs only if condition is true */
}
next-statement; /* always runs */
The condition is evaluated first. If it is true (non-zero), the statement block is executed; if it is false (zero), the block is skipped and control goes to the next statement after the if. The braces can be left out when there is only one statement.
Example:
if (marks >= 35)
printf("Pass");
"Pass" is printed only when marks is 35 or more; otherwise nothing is printed.
Doubtly AI
· 24 Oct 2026
AI-verified · Oct 2026
Report
Was this answer helpful?
Thanks for the feedback.
Sign up free to save answers and ask your own doubts
Your answer
Log in or create a free account to answer this question.