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

1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

0 Answers  


what is the purpose of the following code, and is there any problem with the code? void fn(long* p1, long* p2) { register int x = *p1; register int y = *p2; x ^= y; y ^= x; x ^= y; *p1 = x; *p2 = y; }

1 Answers   Google,


What is the use of a ‘’ character?

0 Answers  


Explain why C language is procedural?

0 Answers   GE,


Can we declare variable anywhere in c?

0 Answers  


print a "hello" word without using printf n puts in c language

6 Answers  


write a program fibonacci series and palindrome program in c

0 Answers   Aditi Placement Service,


Does * p ++ increment p or what it points to?

0 Answers  


write a program to create a sparse matrix using dynamic memory allocation.

0 Answers  


Explain the concept of "dangling pointers" in C.

2 Answers  


Write a code to reverse string seperated by spaces i/p str=India is my country o/p str=aidnI si ym yrtnuoc After writing code, optimize the code

1 Answers  


in b=6.6/a+(2*a+(3*c)/a*d)/(2/n); which operation will be performed first a) 6.6/a b) 2*a c) 3*c d) 2/n

1 Answers  


Categories