what is the size of an integer variable?

Answers were Sorted based on User's Feedback



what is the size of an integer variable?..

Answer / anandi

The size of integer variable is 2 bytes.

Eg:
if u declare like,

int a;

the compiler will allocate the size of the variable a,
to 2 bytes bcoz it is an int variable.

If u want to know the size of any other
variables,structures,etc. use the sizeof() function.

Eg:

int a;
sizeof(a);

this will print 2 which is the size of the int datatype.

Is This Answer Correct ?    3 Yes 0 No

what is the size of an integer variable?..

Answer / piyush

It depends on the compiler we are working on.
if it is 32 bit compiler:(GCC)
integer is 4 bytes
for 18 bit compiler:(Turboc)
integer is 2 bytes

Is This Answer Correct ?    2 Yes 0 No

what is the size of an integer variable?..

Answer / sanjeev

size of integer variable is 2 bytes or 16 bits.

Is This Answer Correct ?    0 Yes 0 No

what is the size of an integer variable?..

Answer / manish soni tagore collage jai

size of integer is
sizeof(int);

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

how i m write c program 1.check prime number 2.prime number series

1 Answers  


write a c program that prints all multiples of 3between 1 and 50.

5 Answers  


write a programme that inputs a number by user and gives its multiplication table.

2 Answers  


Which is the best website to learn c programming?

0 Answers  


Explain what are header files and explain what are its uses in c programming?

0 Answers  






How can you avoid including a header more than once?

0 Answers  


Why is main function so important?

0 Answers  


In which category does main function belong??

5 Answers  


What are near, far and huge pointers?

0 Answers   Hexaware, Thomson Reuters, Virtusa,


how many keywords do C compile?

7 Answers   Microsoft, Practical Viva Questions,


Define recursion in c.

0 Answers  


difference between function & structure

9 Answers   Verizon,


Categories