Q. What is the output of this code?
Code:int main() {
int a = 5, b = 10;
while (a < b) {
printf("%d ", a);
a++;
}
return 0;
}
β
Correct Answer: (A)
5 6 7 8 9
Explanation: The loop prints numbers from 5 to 9; when a becomes 10, the loop exits.