Multiple choice technology programming languages

what is the output? int a = 400; void main() { int b; b=(400 * 400)/ a ; printf("%d",b); }

  1. compilation error

  2. garbage value

  3. 400

  4. 1

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The variable a is initialized to 400. In the main function, b is computed as (400 * 400) / 400, which simplifies mathematically to 400. Printing b with printf displays 400.