Code:
while(ID != 0);
Your code execution will never pass that line, because of the semicolon after the while declaration. The correct form of a while loop would look something like this:
Code:
int i = 0;
while(i < 10)
{
   printf("i = %d\n",i);
   i = i + 1;
}