MCQ
Single Best Answer
Not Set
QWhich of the following is the correct way to set a value 3.14 in a variable pi such that it cannot be modified?
ID: #906
Data Types in C Language
11,872 views
Question Info
#906Q ID
Not SetDifficulty
Data Types in C LanguageTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option B
Explanation
pi = 3.14F; It doesn't declare the data type.
const float pi = 3.14F; is the correct Answer. It declare constant datatype.
const pi; pi = 3.14F; Here data type doesn't declare.
float pi = 3.14F; pi is a floating-point variable but not a constant.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic