what is the size of an integer variable?
Answers were Sorted based on User's Feedback
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 |
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 |
Answer / manish soni tagore collage jai
size of integer is
sizeof(int);
| Is This Answer Correct ? | 0 Yes | 0 No |
where do we use structure pointer?
Do you know pointer in c?
write a program to create a sparse matrix using dynamic memory allocation.
What is the equivalent code of the following statement in WHILE LOOP format?
write a program in C to swap two variables
How does C++ help with the tradeoff of safety vs. usability?
program in c to print 1 to 100 without using loop
What are c header files?
What does 4d mean in c?
What is the purpose of Scanf Print, getchar, putchar, function?
Do variables need to be initialized?
how can be easily placed in TCS.