#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 are valid operations on pointers?
Why doesnt that code work?
Does c have class?
Explain c preprocessor?
What is return in c programming?
In C programming, what command or code can be used to determine if a number of odd or even?
How are structure passing and returning implemented?
What standard functions are available to manipulate strings?
What is variable in c example?
What is wild pointer in c?
in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.
Give basis knowledge of web designing ...
What is nested structure?
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
Write a c program to demonstrate character and string constants?