Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above

1100


Which of these functions is safer to use : fgets(), gets()? Why?

1067


Can static variables be declared in a header file?

1032


How are strings stored in c?

990


What does dm mean sexually?

1277


Why & is used in scanf in c?

1067


What are the differences between Structures and Arrays?

1158


What do you understand by friend-functions? How are they used?

1178


Why isn't it being handled properly?

1036


pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)

2301


What are the keywords in c?

1104


how to execute a program using if else condition and the output should enter number and the number is odd only...

2237


while initialization of array why we use a[][2] why not a[2][]...?

2324


How can you avoid including a header more than once?

948


Explain what is a program flowchart and explain how does it help in writing a program?

1072