IndiaBIX.com
Arithmetic Aptitude Data Interpretation
Logical Reasoning Verbal Reasoning Non Verbal Reasoning
General Knowledge
Sudoku Number puzzles Missing letters puzzles Logical puzzles Playing cards puzzles Clock puzzles
C Programming C++ Programming C# Programming Java Programming
Microbiology Biochemistry Biotechnology Biochemical Engineering
Civil Engineering Mechanical Engineering Chemical Engineering Networking Database Questions Computer Science Basic Electronics Digital Electronics Electronic Devices Circuit Simulation Electrical Enigneering Engineering Mechanics Technical Drawing
Placement Papers Group Disucssion HR Interview Technical Interview Body Language
Aptitude Test Verbal Ability Test Verbal Reasoning Test Logical Reasoning Test C Programming Test Java Programming Test Data Interpretation Test General Knowledge Test
Data Structures Operating Systems Networking DATABASE Database Basics SQL Server Basics SQL Server Advanced SQL Server 2008 JAVA Core Java Java Basics Advanced Java UNIX Unix File Management Unix Memory Management Unix Process Managemnt C Interview Questions The C Language Basics .NET Interview Questions .NET Framework ADO.NET ASP.NET Software Testing

C Programming - Floating Point Issues - Discussion

@ : Home > C Programming > Floating Point Issues > General Questions - Discussion

Read more:

"Everything should be made as simple as possible, but not simpler."
- Albert Einstein
2. 

What will you do to treat the constant 3.14 as a long double?

[A]. use 3.14LD[B]. use 3.14L
[C]. use 3.14DL[D]. use 3.14LF

Answer: Option B

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)


Riya said: (Thu, Sep 16, 2010 03:38:33 AM)    
 
Can anyone explain this in detail that how it works if anyone understand?

Ashish said: (Fri, Dec 3, 2010 04:12:31 AM)    
 
For the long double Lf is used as suffix then how L is used?

Aparna said: (Wed, Mar 2, 2011 09:36:57 AM)    
 
@Ashish

No its totaly wrong.

For long double 'L' is used as suffix.

Mohanraj said: (Sat, May 21, 2011 08:37:34 AM)    
 
Please explain how 3.14 is treat as double?

Chaitanya said: (Thu, Aug 4, 2011 10:56:56 AM)    
 
long double: %LF or %Lf
double :%lf
float:%f or %e or %g
int :%i or %d
long int:%ld or %li
unsigned long:%lu
unsigned int:%u

Subhalaxmi said: (Mon, Sep 12, 2011 01:44:35 PM)    
 
What is the use of LD & DL?

Pavan said: (Thu, Nov 3, 2011 10:12:01 PM)    
 
What exactly difference between double & long double & int?

Harshareddy said: (Tue, Jan 3, 2012 10:12:33 PM)    
 
The double is used for floating 44.45, int for integers like 2,567etc , long double for large floating values like 6.98765342 .

Rajesh said: (Fri, Jan 27, 2012 04:10:19 PM)    
 
For the long double LF is used in c.

Sri Ram said: (Sat, Sep 1, 2012 03:48:35 PM)    
 
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.

Write your comments here:
Name *:     Email:


© 2008-2013 by IndiaBIX™ Technologies. All Rights Reserved | Copyright | Terms of Use & Privacy Policy

Contact us: info@indiabix.com     Follow us on twitter!