Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

#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


Please Help Members By Posting Answers For Below Questions

How does pointer work in c?

1074


How to write a code for reverse of string without using string functions?

2077


Explain what is the general form of a c program?

1035


I need previous papers of CSC.......plz help out by posting them.......

2249


What is the meaning of 2d in c?

1066


Write a program of prime number using recursion.

1041


Define the scope of static variables.

1067


Explain what is wrong with this program statement? Void = 10;

1196


What is clrscr in c?

1078


What is #error and use of it?

1201


Why we write conio h in c?

967


Why do we use namespace feature?

1010


What are inbuilt functions in c?

987


What is bash c?

961


I have seen function declarations that look like this

997