reverse - regarding SIGABRT error

can’t we allocate a 2d matrix of size 10^5 ?will it give SIGABRT error?its working fine in my devc++ compiler but shows error on codechef.

No, you cannot. Before writing code you should do some math: 10^5 * 10^5 * 4(int) / 1024 / 1024 / 1024 = 37,25 GB

7 Likes