#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 static identifier?
What are keywords c?
What is the difference between printf and scanf )?
What is meant by 'bit masking'?
exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above
Do you know the use of fflush() function?
Explain the difference between getch() and getche() in c?
What are the advantages of using linked list for tree construction?
how to create duplicate link list using C???
What is strcmp in c?
Differentiate call by value and call by reference?
What is substring in c?
What is the sizeof () a pointer?
please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................
Explain low-order bytes.