Larges kth characters substring

why kartik sir has done x++ in his code?

hi @pjindal393,
can u send me the code link on ide.codingblocks.com