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...

how to find that no is int or float?

Answer Posted / rajat bera

bool __inline is_integer(float f){
int i = f;
return (f == static_cast<float>(i));
}


int main()
{
int num=0;
double num2= 1234;

num=num2;

if(is_integer(num2))

printf("the number is int");
else
printf("the number is float");

getch();


return 0;

}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are multidimensional arrays?

1123


When is a “switch” statement preferable over an “if” statement?

1152


Explain what are the different file extensions involved when programming in c?

1113


a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above

1114


write a proram to reverse the string using switch case?

2950


what are the facialities provided by you after the selection of the student.

2265


What is the process to create increment and decrement stamen in c?

1061


What are the key features in c programming language?

1076


Explain the bubble sort algorithm.

1075


Why isnt any of this standardized in c?

1086


How do I read the arrow keys? What about function keys?

1088


What is sizeof in c?

1014


When do we get logical errors?

1128


In c programming, explain how do you insert quote characters (? And ?) Into the output screen?

1246


What is the difference between test design and test case design?

2093