Exact output is not printed in pascals trianlgle -1

I have tried pascals triangle - 1 problem but my two dimensional array is not fitting in space. I get some garbage values. How can I resolve that problem.

Question Link:

https://online.codingblocks.com/app/player/276028/content/265902/4703/code-challenge

Solution Link:

Please do the needful.

hi @haardpatel07 refer this its commented

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.