#include<stdio.h>
#include<conio.h>
void main()
{
float a;
clrscr();
a=0.5;
if(a==0.5)
printf("yes");
else
printf("no");
getch();
}
Answer Posted / sandeep
HI froends this is sandeep,
Coming to the question :
First of all we should know that in c language:
integers by default are treated as int,
and numbers with decimal point as double.
so int the ques tion "a is float",but "0.5 is double by default" and "double > float by default"
so "a==0.5" turns out to be false,
so else statement will be executed
output:no
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How does pointer work in c?
How to write a code for reverse of string without using string functions?
Explain what is the general form of a c program?
I need previous papers of CSC.......plz help out by posting them.......
What is the meaning of 2d in c?
Write a program of prime number using recursion.
Define the scope of static variables.
Explain what is wrong with this program statement? Void = 10;
What is clrscr in c?
What is #error and use of it?
Why we write conio h in c?
Why do we use namespace feature?
What are inbuilt functions in c?
What is bash c?
I have seen function declarations that look like this