i made it but the following portion of the prog although it works but it does not seems good to me.
i wonder if i can do it with some loops or something else...
// checking if any player has entered a winning combination
// this code cheks all 8 winning combinations!
//but i wud like to know if i can do it with some alternative way
//2D array name "tictac[][]"
if (tictac[0][0]==tictac[0][1] && tictac[0][1]==tictac[0][2])
flag=tictac[0][0];
else if (tictac[1][0]==tictac[1][1] && tictac[1][1]==tictac[1][2])
flag=tictac[1][0];
else if (tictac[2][0]==tictac[2][1] && tictac[2][1]==tictac[2][2])
flag=tictac[2][0];
else if (tictac[0][0]==tictac[1][0] && tictac[1][0]==tictac[2][0])
flag=tictac[0][0];
else if (tictac[0][1]==tictac[1][1] && tictac[1][1]==tictac[2][1])
flag=tictac[0][1];
else if (tictac[0][2]==tictac[1][2] && tictac[1][2]==tictac[2][2])
flag=tictac[0][0];
else if (tictac[0][0]==tictac[1][1] && tictac[1][1]==tictac[2][2])
flag=tictac[0][0];
else if(tictac[2][0]==tictac[1][1] && tictac[1][1]==tictac[0][2])
flag=tictac[2][0];