--- In [email protected], praveen indian85 <praveen_india...@...> wrote:
>            dec=dec+temp*pow(2,i);

pow() takes double arguments and returns a double. The following would be more 
appropriate:

  dec += temp * (1 << i);

BTW is (int)pow(2, i) guaranteed to return the same as (1 << i) for say integer 
i=0..15 (assuming 32 bit int)?

Reply via email to