Shalini <Sh************@mail.codecomments.com> writes:
what does the size of an integer depend on ?? is it the Operating
system, processor or the associated memory in the system ??
It depends on the judgement of the implementer of the compiler,
subject to the restrictions in the standard. That judgement in turn
typically depends on the nature of the underlying system (int is very
often, but not always, the size of a CPU data register; sizes of other
integer types can depend on what the hardware conveniently supports).
Compatibility with other systems can also be a consideration; a
compiler for a "32-bit" system might have 16-bit int for compatibility
with older "16-bit" versions of the system. (I put "16-bit" and
"32-bit" in quotation marks because there's no universal agreement on
what those terms mean.)
--
Keith Thompson (The_Other_Keith)
ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.