Yes that will do the same job but why? That while function is known as an infinite loop and is the standard way to do that job. With the for loop you just need
for(; ; ;);
But it is not conventional to do that.
For any one problem the C language offers many ways to code, but it is best to keep to conventional methods if you want others to readily understand what you are doing.