Advanced DP - MIXTURES

In this code ,sir use while((scanf("%d",&n)!= EOF){ }
to read till end of line .
So how it works ?

Hello @asif_h you want to know about the condition in the while loop how it is working?
if yes then it will work like from the file while loop will run till it is able to scan number from it. when it is not able to it will get that we have reached the end of the file(EOF).
and then while loop will be terminated:
if you still have doubt you can ask here:
Happy Learning!!

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.