Question: how would i convert this for loop C code to a while loop? void printbinary(const int number) // const makes sure number won't change inside

how would i convert this for loop C code to a while loop?

void printbinary(const int number) // const makes sure number won't change inside the function. { for (int i = 31; i >= 0; i--) { int a = number >> i; if (a & 1) printf("1"); else printf("0"); } //system("PAUSE"); return; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!