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

What is %lu in c?

929


formula to convert 2500mmh2o into m3/hr

763


How many bytes is a struct in c?

917


Are comments included during the compilation stage and placed in the EXE file as well?

885


What is main return c?

749


What are valid operations on pointers?

954


how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12

852


What is the difference between single charater constant and string constant?

864


Do array subscripts always start with zero?

1021


Write a program to implement queue.

885


Can you please explain the difference between syntax vs logical error?

943


Is void a keyword in c?

763


What is the value of a[3] if integer a[] = {5,4,3,2,1}?

880


what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9

1632


What are terms in math?

803