C Programming - Floating Point Issues - Discussion
Discussion Forum : Floating Point Issues - General Questions (Q.No. 2)
2.
What will you do to treat the constant 3.14 as a long double?
Answer: Option
Explanation:
Given 3.14 is a double constant.
To specify 3.14 as long double, we have to add L to the 3.14. (i.e 3.14L)
Discussion:
15 comments Page 1 of 2.
Rathisha said:
7 years ago
What is difference between float and double?
Gyan said:
10 years ago
Please briefly explain.
Madhavi said:
1 decade ago
3.14 can be just double now why is it long double? Can anyone please explain.
Mahendra Kumar Verma said:
1 decade ago
@Chaitanya.
In which book defined all type according to your explanation!
In which book defined all type according to your explanation!
Rathi said:
1 decade ago
A floating-point constant without an f, F, l, or L suffix has type double. If the letter f or F is the suffix, the constant has type float. If suffixed by the letter l or L, it has type long double.
Sri ram said:
1 decade ago
Double is also like floating point but having size of 4 bytes,double has 8 bytes,long double has 10 bytes and integer has 2 bytes.So long double can store larger floating points also.Here 3.14 is a long double.
Rajesh said:
1 decade ago
For the long double LF is used in c.
Harshareddy said:
1 decade ago
The double is used for floating 44.45, int for integers like 2,567etc , long double for large floating values like 6.98765342 .
Pavan said:
1 decade ago
What exactly difference between double & long double & int?
Subhalaxmi said:
1 decade ago
What is the use of LD & DL?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers