if one thread stucks in "gets" command then it does not allow any other thread to printf any thiing. i have also tried scanf but the same result. what should i do. i want other threads to print on command line but they did not if one of the threads stucks in "gets" or scanf.

plz help me out

thnx in advancce

The console is a shared resource among all threads. It would be just a jumbled mess if one thread tried to output text to the console screen at the same time you are trying to input text with fgets(). I would think you need to redesign the threads so that confusion doesn't happen.