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 c program for swapping two strings using pointer

2077


What are structural members?

558


Explain what is the difference between a free-standing and a hosted environment?

624


how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions

2710


When do we get logical errors?

627






What is the difference between procedural and functional programming?

509


With the help of using classes, write a program to add two numbers.

609


Explain what are the __date__ and __time__ preprocessor commands?

582


How many types of operator or there in c?

591


Which is the best website to learn c programming?

568


What is wrong with this program statement?

600


What would be an example of a structure analogous to structure c?

567


why programs in c are running with out #include? some warnings are display in terminal but we execute the program we get answer why? eg: main() { printf("hello world "); }

1307


What is the stack in c?

709


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

2256