You are here:

C++/Memory size of Arrays in C++


Sir, I am working on a C program and sometimes need large sized arrays like A[1000][1000] far many variables and also sometime for 3 dimentional arrays. I am using Visual C++ and after a certain size it gets hanged. I tried to run on the Turbo C++ and it show an error of oversized array. Please let me know solution for my problem. I know some people were telling about dynamic programming but I am not too good in C programming and most of my programs are very simple coded ones. I really need help in this regard and will be very thankful for any suggestions to solve the problem.


Hi Arif

I can understand your problem pretty well coz once I have tried finding you the maximum memory that can be allocated and found out that max memory that can be allocated with a single call to calloc or malloc is the size of an unsigned integer so if you need to allocate memory beyond 64kb then you need to use interrupts but rather i would suggest you to use linked list in such a case, it would be a much safer and better practice for getting things done.

Please do feel free to get back to me in case if you have any doubt regarding the same.

Joydeep Bhattacharya


All Answers

Answers by Expert:

Ask Experts


Joydeep Bhattacharya


TSR, Socket and Very Complex Mathematical Problem


Worked on many OOP projects with design patterns



Master of Computer Applications

Awards and Honors
Being a proud owner of a website of programming called

Past/Present Clients

©2017 All rights reserved.