Why string datatype is not holding larger length string like 10^12

https://ide.codingblocks.com/s/50778
code is not giving output for larger n value.

Hi Ankur.
You can check the the maximum length the string can reach like this.
https://ide.codingblocks.com/s/50782

since the range is too much high then why my code is not working for larger n value.

Hey Ankur, mention the problem’s exact name for which you have written this code.