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

What are valid operations on pointers?

1264


Why doesnt that code work?

1279


Does c have class?

1181


Explain c preprocessor?

1162


What is return in c programming?

1024


In C programming, what command or code can be used to determine if a number of odd or even?

1097


How are structure passing and returning implemented?

1092


What standard functions are available to manipulate strings?

1210


What is variable in c example?

1133


What is wild pointer in c?

1128


in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.

8121


Give basis knowledge of web designing ...

2060


What is nested structure?

1099


There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?

1358


Write a c program to demonstrate character and string constants?

2248