rajat bera


{ City } bangalore
< Country > india
* Profession * software engineer
User No # 10963
Total Questions Posted # 0
Total Answers Posted # 1

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 1
Users Marked my Answers as Wrong # 0
Questions / { rajat bera }
Questions Answers Category Views Company eMail




Answers / { rajat bera }

Question { 7667 }

how to find that no is int or float?


Answer

bool __inline is_integer(float f){
int i = f;
return (f == static_cast(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