#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
I have a varargs function which accepts a float parameter?
to find the closest pair
Why functions are used in c?
What does the message "automatic aggregate intialization is an ansi feature" mean?
What is the heap?
How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?
What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }
Explain output of printf("Hello World"-'A'+'B'); ?
What is const volatile variable in c?
What will the preprocessor do for a program?
What is use of pointer?
What is the right type to use for boolean values in c? Is there a standard type?
What are register variables in c?
What is #define size in c?
How can type-insensitive macros be created?