Multiple choice technology programming languages

Note the following code and then select the correct answer: #include main() { int i; printf ("enter integer: "); scanf ("%d",&i); printf ("You have entered: %f ", i); return (0); }

  1. Will not compile

  2. Will compile with warnings, but run

  3. Will compile without warning, but not run

  4. Will give an output of 1

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

The code attempts to print an integer variable i using the format specifier %f, which expects a floating-point value. While this type mismatch causes undefined behavior at runtime, most C compilers will issue a warning and still successfully compile the code.