C: scanf did not stop in infinite while loop

scanf() causing infinite loop
while (scanf)
c skipping scanf
fscanf in a while loop
scanf inside for loop
c program skipping scanf
when does scanf stop
printf not working after scanf