what is the size of an integer variable?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How will you divide two numbers in a MACRO?

933


What is a shell structure examples?

840


Write a simple code fragment that will check if a number is positive or negative.

936


What is formal argument?

903


What is exit() function?

797


explain what are pointers?

815


What is static and volatile in c?

1016


what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9

1650


What is a spanning Tree?

1284


Explain void pointer?

824


Why can’t we compare structures?

1069


What is data structure in c programming?

841


What are formal parameters?

879


What is extern keyword in c?

903


Which header file is essential for using strcmp function?

1236