Designing String Tokeniser - Compilation Error

Code Link = https://ide.codingblocks.com/s/202277

It is giving the following error in Coding Blocks ide - /bin/run.sh: line 4: 18 Segmentation fault (core dumped) ./exe < run.stdin > run.stdout 2> run.stderr

When compiled in my own computer, the output of the code after “Part 2” is not displayed.

@vyomgarg47
hello vyom,
image
add this if statement before line no 13.

Even after that, the output of the code after “Part 2” is not displayed.
But the code is compiling in the Coding Blocks ide.
Code link = https://ide.codingblocks.com/s/202732

@vyomgarg47
ok ,let me check

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.

What was the problem in his code?