C Programming - Declarations and Initializations - Discussion
Discussion Forum : Declarations and Initializations - True / False Questions (Q.No. 2)
2.
A float is 4 bytes wide, whereas a double is 8 bytes wide.
Answer: Option
Explanation:
True,
float = 4 bytes.
double = 8 bytes.
Discussion:
5 comments Page 1 of 1.
AdamK said:
1 decade ago
Neither C nor C++ standard fixes the width of float or double variables. IEEE 754 standard does include this but C99 only says "The set of values of the type float is a subset of the set of values of the type double; the set of values of the type double is a subset of the set of values of the type long double".
Arnold said:
9 years ago
I disagree @Ajit.
Because { single precision float data type has 4 bytes while a double precision float data type has 8 bytes}.
Because { single precision float data type has 4 bytes while a double precision float data type has 8 bytes}.
Brajesh said:
10 years ago
I agree with @Ajit that since its compiler dependent so it must be false statement.
Ankit said:
5 years ago
The size of float and double are depends from machine to machine.
Ajit said:
1 decade ago
This is compiler dependent, so the answer should be false.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers