A solution for 8 queens problem in C