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 are multidimensional arrays?
When is a “switch” statement preferable over an “if” statement?
Explain what are the different file extensions involved when programming in c?
a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above
write a proram to reverse the string using switch case?
what are the facialities provided by you after the selection of the student.
What is the process to create increment and decrement stamen in c?
What are the key features in c programming language?
Explain the bubble sort algorithm.
Why isnt any of this standardized in c?
How do I read the arrow keys? What about function keys?
What is sizeof in c?
When do we get logical errors?
In c programming, explain how do you insert quote characters (? And ?) Into the output screen?
What is the difference between test design and test case design?