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 the need of structure in c?
How does selection sort work in c?
What is data types?
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples
What is the -> in c?
a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion
Is javascript based on c?
What are linker error?
Explain what are compound statements?
What is the acronym for ansi?
What is the difference between malloc() and calloc()?
What is the purpose of the statement: strcat (S2, S1)?
How can you avoid including a header more than once?
general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only
what do you mean by inline function in C?