C Programming - Floating Point Issues
Why should I learn to solve C Programming questions and answers section on "Floating Point Issues"?
Learn and practise solving C Programming questions and answers section on "Floating Point Issues" to enhance your skills so that you can clear interviews, competitive examinations, and various entrance tests (CAT, GATE, GRE, MAT, bank exams, railway exams, etc.) with full confidence.
Where can I get the C Programming questions and answers section on "Floating Point Issues"?
IndiaBIX provides you with numerous C Programming questions and answers based on "Floating Point Issues" along with fully solved examples and detailed explanations that will be easy to understand.
Where can I get the C Programming section on "Floating Point Issues" MCQ-type interview questions and answers (objective type, multiple choice)?
Here you can find multiple-choice C Programming questions and answers based on "Floating Point Issues" for your placement interviews and competitive exams. Objective-type and true-or-false-type questions are given too.
How do I download the C Programming questions and answers section on "Floating Point Issues" in PDF format?
You can download the C Programming quiz questions and answers section on "Floating Point Issues" as PDF files or eBooks.
How do I solve C Programming quiz problems based on "Floating Point Issues"?
You can easily solve C Programming quiz problems based on "Floating Point Issues" by practising the given exercises, including shortcuts and tricks.
- Floating Point Issues - General Questions
- Floating Point Issues - Find Output of Program
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)
#include<stdio.h>
#include<math.h>
int main()
{
float a=5.375;
char *p;
int i;
p = (char*)&a;
for(i=0; i<=3; i++)
printf("%02x\n", (unsigned char)p[i]);
return 0;
}
The range of long double is 3.4E-4932 to 1.1E+4932
#include<stdio.h>
int main()
{
printf("%f\n", log(36.0));
return 0;
}
math.h is a header file in the standard library of C programming language designed for basic mathematical operations.
Declaration syntax: double log(double);