s_client = accept(s,(struct sockaddr *)&cin,&addrlen);
Got the solution:
Actually above line i was executing as
if(s_client=accept(s,(struct sockaddr *)&cin,&addrlen !=-1)
but now i do it as
if((s_client=accept(s,(struct sockaddr *)&cin,&addrlen)!=-1)
Paranthesis was the whole problem creator
Thanks a lot.