Pls help me to remove the segmentation fault frm the code

@Senjuti256


changed both sizes

Why is it showing segmentation fault with size 10^6?

@Senjuti256 storing such large values statically can cause it

but in other qstns when I used array of this size it didn’t show such faults

@Senjuti256 it also depends on compiler to compiler but it would be always beneficial if large array use dynamic