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 is c token?

1064


What is the code for 3 questions and answer check in VisualBasic.Net?

2157


what is the difference between class and unio?

2360


What is the purpose of main( ) in c language?

1133


What are the types of operators in c?

1059


What are the three constants used in c?

995


What are inbuilt functions in c?

1033


Why pointers are used in c?

1006


Place the #include statement must be written in the program?

1033


Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.

1063


find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2

1989


Differentiate between calloc and malloc.

1261


What is the significance of c program algorithms?

1146


Explain the properties of union. What is the size of a union variable

1186


What is the scope of local variable in c?

1123