Single Choice Not Set

QWhich of the following is the correct default value of a Boolean type? / The default value of a boolean variable is:

ID: #905 Data Types in C Language 5,683 views
Question Info
#905Q ID
Not SetDifficulty
Data Types in C LanguageTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • B 1 ✔ ✖
  • C True ✔ ✖
  • D False ✔ ✖
Correct Answer

Explanation

False is the correct default value of a Boolean type.

The default value of a boolean variable in Java:

  • In Java, if you declare a boolean instance variable (not local variable) and do not initialize it, its default value is false. ✅

  • False and True (capitalized) are not valid in Java.

  • 0 is an integer, not boolean.

Answer: false

Today: 0 answered · 0 correct
Save progress
Free account

Want to remember what you got wrong?

Create a free account in seconds to track your score, revisit mistakes and continue Programming Language where you left off.

  • Save your progress & streak
  • Topic-wise quizzes & scores
  • Bookmark tricky questions
  • Printable MCQ sets
Practice smarterFree account · save progress
Sign up free

Share This Question

Challenge a friend or share with your study group.