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

Add Two Numbers Without Using the Addition Operator

458


Write a program to print fibonacci series using recursion?

708


What is meant by type specifiers?

769


Which is the best website to learn c programming?

702


Explain a file operation in C with an example.

757






What are derived data types in c?

707


program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)

1724


printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions

737


What is %g in c?

743


When is a null pointer used?

734


Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

725


The file stdio.h, what does it contain?

773


When should volatile modifier be used?

654


What is C language ?

1625


What is openmp in c?

702