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 |
What's the right way to use errno?
whenever a question is posted in a particular category in allinterview.com, Is there any facility to receive an indication mail. For eg: I need to receive an indication email, whenever a question is posted under the category “C Langauage”.
write a program to find the frequency of a number
in one file global variable int i; is declared as static. In another file it is extern int i=100; Is this valid ?
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
array of pointer pointer to array pointer to pointer
Explain what is wrong with this program statement?
#include <stdio.h> int main() { int i; for (i=0;i<3;++i) { fork();fork(); } } How many processes are created when running this program (including the initial one)? Explain ؟؟؟
what does keyword ‘extern’ mean in a function declaration?
What is static function in c?
what is the format specifier for printing a pointer value?
What are dangling pointers? How are dangling pointers different from memory leaks?