Bird
0
0

What type of literal is '3.14' in C?

easy📝 Conceptual Q2 of 15
C - Variables and Data Types
What type of literal is '3.14' in C?
AInteger literal
BString literal
CCharacter literal
DFloating-point literal
Step-by-Step Solution
Solution:
  1. Step 1: Understand literal types

    Integer literals are whole numbers; floating-point literals have decimals.
  2. Step 2: Analyze '3.14'

    It has a decimal point, so it is a floating-point literal.
  3. Final Answer:

    Floating-point literal -> Option D
  4. Quick Check:

    3.14 is floating-point literal [OK]
Quick Trick: Decimals mean floating-point literals in C [OK]
Common Mistakes:
  • Mistaking floating-point for integer
  • Confusing character and string literals

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Quizzes