#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 the use of bit field?
Explain bitwise shift operators?
What is volatile variable in c with example?
What are the features of c language?
Can you mix old-style and new-style function syntax?
What is union and structure?
Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..
What is the difference between break and continue?
When a c file is executed there are many files that are automatically opened what are they files?
An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array
Is swift based on c?
Why do we need arrays in c?
What are pragmas and what are they good for?
Why does everyone say not to use gets?
What are the __date__ and __time__ preprocessor commands?