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

Write a program to print numbers from 1 to 100 without using loop in c?

639


What is New modifiers?

669


Write a code on reverse string and its complexity.

608


Explain what are bus errors, memory faults, and core dumps?

791


how should functions be apportioned among source files?

627






How can I read a binary data file properly?

635


what is the function of pragma directive in c?

626


What is the use of c language in real life?

530


How can I run c program?

688


What is the purpose of main( ) in c language?

620


When was c language developed?

703


How do you sort filenames in a directory?

714


i want to switch my career from quailty assurance engineering to development kindly guide me from which programming language its better for me to start plz refer some courses or certifications too i have an experience of 1.5 yrs in QA field.Kindly guide me

1480


Is there a built-in function in C that can be used for sorting data?

744


What the different types of arrays in c?

612