C

[C] 028 쉼표 연산자

qkrwngus 2021. 1. 20. 21:01

Desc :

 

변수를 여러개 정의할 수 있게 해주고, 변수를 함수에 차례대로 넘겨주기도 함


Source Code :

#include <stdio.h>

void main()
{
	int x = 1, y = 2, max;

	max = x > y ? x : y;

	printf("max=%d, x=%d, y=%d\n", max, x, y);
}

 


Result :