What is the output for the following C code segment? int i; if(printf("0")) i = 5; else i = 3; printf("%d",i);

What is the output for the following C code segment?

int i;
if(printf("0")) i = 5;
else i = 3;
printf("%d",i);
  1. a) 3
  2. b) 5
  3. c) 03
  4. d) 05

From the Combined Bank Assistant Programmer (CSE) March 2021 – Preliminary exam, question 3 of 86.

More from this paper