long int size
a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
Answer / karthik
THE MAIN USE OF SHORT AND LONG IS TO USE IN COMPILER
INDEPENDENT ENVIRONMENT..
Is This Answer Correct ? | 0 Yes | 5 No |
#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?
how can i print "hello".please consider inverted commas as well.i want to print on console: "hello"
why integer range between -327680to+32767
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
Wt are the Buses in C Language
Write a program to reverse a given number in c language?
Can a program have multiple main() functions?
How many types of functions are there in c?
what is link list?
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.
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?