index-1 后 变量index的值并没有变化 只是表达式的值变了
#include <stdio.h>
int main (void)
{
int index = 0, convertedNumber[64], numberToConvert;
printf ("Number to be converted:");
scanf ("%i", &numberToConvert);
do
{
convertedNumber[index] = numberToConvert % 2;
index ++;
numberToConvert = numberToConvert / 2;
}
while (numberToConvert != 0);
printf ("numberToConvert = ");
for (; index-1 >= 0; index--)
{
printf("%d", convertedNumber [index-1]);
}
printf ("\n");
return 0;
}