platform dependent means based on operating system architecture.
ie in some of 32 bit OS, the size of int is 2byte and in some of 64 bit OS, the size of int is 4 byte. It also varies based on the compiler used.
Example: in VC++ it is 4byte and in TC++ it is 2 byte
Categories
FollowersBlog Archive
Jobs
Find more freelance jobs
|
Friday, November 9, 2007
Subscribe to:
Post Comments (Atom)
|
Popular Posts
|
Hi,
ReplyDeleteI think the explanation is incorrect.
If the OS is 32 bit, in the sense it is initializing the complete Advanced Features of the Processor, for eg, intel processor. 32 bits is 4 bytes, hence for an integer it is 4 bytes. For 16 bit OS, in the sense the OS is initializing the processor in 8086 mode. 16 bit is 2 bytes, hence the integer size is 2 bytes.
Correct me if I am wrong.
Bhaskar,
ReplyDeleteYou are right.
Keep posting the answers / correcting them.
Thanks for correcting.
Regards,
KKK