Your code
is was rather unreadable (thanks to Chris for editing; I tried it before answering here but failed).
But I guess the solution is
while((num=getw(f1))!=EOF)
{
if(num%2!=0)
{
putw(num,f2);
c++;
}
}
while your code seems to be
while((num=getw(f1))!=EOF)
if(num%2!=0)
putw(num,f2);
c++;
Note that using proper indentation shows what is happening.