#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
What is a void * in c?
What are types of structure?
What does c mean in basketball?
Which is best book for data structures in c?
Explain 'bit masking'?
Which driver is a pure java driver
What is main () in c?
plz let me know how to become a telecom protocol tester. thank you.
what is the structure pointer?
What are the difference between a free-standing and a hosted environment?
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
Is there a way to compare two structure variables?
What is the difference between printf and scanf )?
Can a local variable be volatile in c?
Did c have any year 2000 problems?