post_pre.c

This commit is contained in:
wandoubaba517 2023-12-19 20:36:39 +08:00
parent bd04092af5
commit e436681710

15
c05_expression/post_pre.c Normal file
View File

@ -0,0 +1,15 @@
/* post_pre.c - 前缀和后缀 */
#include <stdio.h>
int main(void)
{
int a = 1, b = 1;
int a_post, pre_b;
a_post = a++;
pre_b = ++b;
printf("a\ta_post\tb\tpre_b\n");
printf("%d\t%d\t%d\t%d\n", a, a_post, b, pre_b);
return 0;
}