Alex Rivera | Logout

Which C datatype can represent a 40-bit binary number?

Asked 2012-03-07T03:01:45.320
8

I need to represent a 40-bit binary number. Which C datatype should be used to handle this?

Edit
Report

1 Answer

1

The existing answers are good, but if you want C89 support too, double will be able to store 40-bit integers exactly on all IEEE 754 conformant implementations.

answered 2012-03-07T05:20:25.990

Your Answer