how the size of an integer is decided?
- is it based on processor or compiler or OS?

Answer Posted / lanchai

Different hardware systems might have a different size for
an integer. you might get a different number in different
OS because the hardware running the OSes were different to
begin with. also, the "sizeof" command is actually a
compile-time command calculated by the compiler (see
wikipedia on sizeof)

So strictly speaking, its the hardware (or processor) that
determines the size of an integer.

Is This Answer Correct ?    11 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which node is more powerful and can handle local information processing or graphics processing?

937


Difference between constant pointer and pointer to a constant.

699


What does c mean in basketball?

664


Is that possible to store 32768 in an int data type variable?

779


What is data types?

719






When should the const modifier be used?

747


What is the role of && operator in a program code?

656


What are the data types present in c?

720


What does d mean?

675


#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }

772


What oops means?

665


Is c++ based on c?

749


What are the 5 elements of structure?

688


What is c++ used for today?

754


What is the size of a union variable?

685