Let's start by fixing the glaring problems.
First, you need to include <stdio.h>. You would also need to include <conio.h> if I weren't recommending that you not use clrscr.
Always. No excuses. Yes, I've heard them all before, and no, I'm not interested in hearing them again. Just use it.
>int a = 12;
You don't use this, and in the current code it's just filler anyway.
>clrscr();
This is a great way to ........ users off. I can guarantee that if I start a console program and it clears all of my previous output from other programs, I'll never use it again.
>count++;
You just invoked undefined behavior by accessing an indeterminate value from an uninitialized variable.
>how can I re-write this as a while loop?
If you don't mind the binary value in reverse, it's trivial:
If you do mind, you need to cache the results and then print them properly. Using an array, for example.