Important MCQ

int a=5; if (a%2==1) cout<<"Odd"; prints

Q.int a=5; if (a%2==1) cout<<"Odd"; prints

A) Odd
B) 1
C) Even
D) nothing
Correct Answer:
Option A
Detailed Explanation:
A) Odd is correct. An if statement executes its body only when its condition is true. The condition is written in parentheses, and braces group multiple statements.