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

Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given

0 Answers   XYZ,


Why do we use header files in c?

0 Answers  


How to calculate Total working time using Login and logout?

2 Answers   CTS, Cygnus, Infosys, Signal Networks, TCS, Wipro,


main() { char *p1="Name"; char *p2; p2=(char *)malloc(20); while(*p2++=*p1++); printf("%s\n",p2); }

4 Answers   CitiGroup,


How to delete a node from linked list w/o using collectons?

0 Answers   Zycus Infotech,


What is bubble sort technique in c?

0 Answers  


What is hash table in c?

0 Answers  


can anyone please tell me wat is backlogs... i was looking for the job openings where i read this.. eligibility criteria minimum 70% in degree without backlogs. is that arrear.. if so is it standing arrear or history of arrears... please help me...

11 Answers   CTS, Indian Navy, L&T, Microsoft, SSB, TCE, TCS,


what does exit() do?

3 Answers   Cadence,


In which language linux is written?

0 Answers  


out put of printf(“%d”,printf(ram));

5 Answers  


What is conio h in c?

0 Answers  


Categories