I use turbo C which allocates 2 bytes for integers and 4
bytes for long. I tried to declare array of size 500000 of
long type using the following code...
long *arr;
arr=(long *)(malloc)(500000 * sizeof(long));
It gives a warning that "Conversion may lose significant
digits in function main"...
And the resulting array size was very less around 8400 as
compared to 500000. Any suggestions will be welcomed....
Answer Posted / vignesh1988i
good morning to you.....
here what i suggest is that , at the time of dynamic memory allocation the memory would not been in the position to allocate that much of huge memory at a single instance...... UR MEMORY WILL BE INCAPABLE IF U TRY TO ALLOCATE A HUGE AMOUNT LIKE ABOVE FOR UR USE.......
u try this.... you declare an array size of 200 or 300... this will give a warning that MEMORY FULL........ the one of the disadvantages in C is that we cant balance a very large amount of data's which are outside the range .... so only we will go for DATA BASE.......
hope this helps u for getting some ideas.......
thank u
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this
plz let me know how to become a telecom protocol tester. thank you.
how do you programme Carrier Sense Multiple Access
Why should I use standard library functions instead of writing my own?
Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)
List some basic data types in c?
int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer
What is the maximum length of an identifier?
Function calling procedures? and their differences? Why should one go for Call by Reference?
What is the difference between int main and void main in c?
What is the basic structure of c?
Are global variables static in c?
What does 3 periods mean in texting?
Which node is more powerful and can handle local information processing or graphics processing?