代码:
#include <stdio.h>
#include <windows.h>
#include <math.h>
void main()
{
int a = 0, b =0;
//int c = 3 > 0 ? a = 8 : b = 6;这种错误:三目比赋值=要高相当于:
//int c = (3 > 0 ? a = 8 : b) = 6; 三目比赋值=要高
int c = 3 > 0 ? a = 8 : (b = 6);
printf("a=%d,b=%d,c=%d", a,b,c);
}