Multiple choice

According to Standard C, what is the type of an unsuffixed floating-point literal, such as 123.45?

  1. Long double

  2. Unspecified

  3. Float

  4. Double

  5. Signed float

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

According to the ISO C standard, an unsuffixed floating-point constant defaults to the type double. If a float literal requires a different type, explicit suffixes like f (for float) or l (for long double) must be appended.