Suppose a C program has floating constant 1.414, what’s the best way to convert this as “float” data type?
(C) 1.414f or 1.414F
(D) 1.414 itself of “float” data type i.e. nothing else required.
Explanation: By default floating constant is of double data type. By suffixing it with f or F, it can be converted to float data type. For more details, this post can be referred here.
Quiz of this Question
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.