更新时间:2023-01-25 14:05:43
如果(A [++] =='X')
本身是C.它细然而,语义不同:您原来的code仅增加 I
如果条件为真,而如果(A [++] == 'X')
总是增加 I
。
if (a[i++] == 'x')
by itself is fine in C. It is, however, semantically different: Your original code only increments i
if the condition is true, whereas if (a[i++] == 'x')
always increments i
.