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

#include<stdio.h> main() { char *p1; char *p2; p1=(char *) malloc(25); p2=(char *) malloc(25); strcpy(p1,"Ramco"); strcpy(p2,"Systems"); strcat(p1,p2); printf("%s",p1); } Tell me the output?

6 Answers   Ramco,


how can i print "hello".please consider inverted commas as well.i want to print on console: "hello"

4 Answers   Wipro,


why integer range between -327680to+32767

2 Answers  


5) Write a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors.without using big int and exponential function

1 Answers   TCS,


Wt are the Buses in C Language

0 Answers   Infosys,






Write a program to reverse a given number in c language?

0 Answers  


Can a program have multiple main() functions?

1 Answers  


How many types of functions are there in c?

0 Answers  


what is link list?

3 Answers  


Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.

0 Answers  


main() { char *p1="Name"; char *p2; p2=(char *)malloc(20); while(*p2++=*p1++); printf("%s\n",p2); } what is the output?

7 Answers   AMCAT, HCL, Ramco, Zycus Infotech,


What is static identifier?

0 Answers   TCS,


Categories