#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 / ankita sharma
Answer will be yes. we can compare two floating point numbers. as a is having value 0.5 and when it is compared with 0.5 so 1st printf would get executed which is inside if statement. so we would get answer as "yes" on the console window as output.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Can we change the value of static variable in c?
Compare and contrast compilers from interpreters.
What is the difference between exit() and _exit() function?
What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.
what is different between auto and local static? why should we use local static?
if p is a string contained in a string?
What are the two forms of #include directive?
What is the difference between scanf and fscanf?
For what purpose null pointer used?
Are pointers integers in c?
When is a void pointer used?
which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +
What is the use of bitwise operator?
Can we change the value of constant variable in c?
Can a pointer be static?