#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char *argv[]) {
int t=5;
while(t--){
}
printf("%d",t);
return 0;
}
得到t的值为-1;
#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char *argv[]) {
int t=5;
while(--t){
}
printf("%d",t);
return 0;
}
得到t的值为0;