Code gives Double Free Corruption Segementation Fault

Please check my code. Here it is

@Doctor_Insult,
Try now, Code.

No…Still same error…but I didn’t find any changes in your given code

@Doctor_Insult,
Try now, Code.
I think I shared the wrong link before.