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
What is c token?
What is the code for 3 questions and answer check in VisualBasic.Net?
what is the difference between class and unio?
What is the purpose of main( ) in c language?
What are the types of operators in c?
What are the three constants used in c?
What are inbuilt functions in c?
Why pointers are used in c?
Place the #include statement must be written in the program?
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.
find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2
Differentiate between calloc and malloc.
What is the significance of c program algorithms?
Explain the properties of union. What is the size of a union variable
What is the scope of local variable in c?