I am getting a never ending loop of soln matrix and in cb ide it shows tle ..please help

my code => https://ide.codingblocks.com/s/200551

This is the same code as in video,I checked it a lot of times but I am not able to find any flaw … the ans gets printed on and on and never stops

I have edited your code… Try to submit it now…

Hi, Thanks for help, Can you tell me what part was causing a never ending matrix output?

In your code, you were not returning the recursive calls as, for eg in line no 52 of your code…
if(j==n)
{
solveSudoku(mat,i+1,0,n);
}

rather you need to write
if(j==n)
{
return solveSudoku(mat,i+1,0,n);
}

and you were not taking inputs from the user… I have done as well in the code…