long int size
a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes

Answers were Sorted based on User's Feedback



long int size a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes ..

Answer / rohit

yes, i too agree it is compiler dependent. But, can anyone
explain, why it is compiler dependent?

If it is a 16 bit compiler, then the size of int is 2
bytes. If it is a 32 bit compiler, then the size of int is
4 bytes. Is there is any reason behind this? It will be
helpful if anyone clarifies this?

Is This Answer Correct ?    3 Yes 1 No

long int size a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes ..

Answer / jp

The integer size is processor dependent.
In Turbo C or Borland C , we are using only the 8086
virtual mode processor. thus we get size of int as 2Byte
and thus size of long int as 4 Byte.

Is This Answer Correct ?    2 Yes 2 No

long int size a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes ..

Answer / noone

8 bytes

Is This Answer Correct ?    1 Yes 1 No

long int size a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes ..

Answer / http://abhishek-technicalwork.

the ans to this question is (a) if the compiler is of 16 bit.
like c language compiler of 16 bit.
so it can be said that the size of the long int is compiler dependent..
therefore option (c) is also correct

Is This Answer Correct ?    0 Yes 0 No

long int size a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes ..

Answer / darshan l.

Of course it is compiler dependent.
But the minimum size of long int must be 4 bytes(32 bits); it may be more than that also.

Is This Answer Correct ?    0 Yes 0 No

long int size a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes ..

Answer / nilabh

4 bytes

Is This Answer Correct ?    0 Yes 3 No

long int size a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes ..

Answer / karthik

THE MAIN USE OF SHORT AND LONG IS TO USE IN COMPILER
INDEPENDENT ENVIRONMENT..

Is This Answer Correct ?    0 Yes 5 No

long int size a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes ..

Answer / suchita

long integers require twice the space in memory than ordinary
ints. thus, long integers would occupy four bytes of memory.

Is This Answer Correct ?    30 Yes 48 No

Post New Answer

More C Interview Questions

I have an array of 100 elements. Each element contains some text. i want to: append a star character to the end of every fifth element remove every second character from every tenth element, and… add a line feed (ascii 10) after the 30th character of every array element whose length is greater than 30 characters.

1 Answers  


How to implement a packet in C

0 Answers   Aricent,


write a string copy function routine?

2 Answers  


What does != Mean in c?

0 Answers  


which one is highest Priority in c? a)=,b)+,c)++,d)==

4 Answers  






Difference between constant pointer and pointer to a constant.

0 Answers   Huawei,


/*program to calculate hra,da in salary if salary less than 10000 then hra15%,da13% otherwise hra20%,da18%/*

6 Answers  


I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.

0 Answers   Oracle,


what is the hexidecimal number of 4100?

16 Answers   Google,


c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above

0 Answers  


Code for calculating square root without using library function, of math.h

4 Answers   IBM,


What happens if you free a pointer twice?

0 Answers  


Categories