반응형
#include<stdio.h>
int main()
{
	int x=10, y=20, tmp=30;
	
	x++, ++y; //증감 연산자 활용  
	tmp += x + y++;
	
	printf("x: %d, y: %d, tmp: %d \n", x, y, tmp);
	
	return 0;
}
/*
x: 11, y: 22, tmp: 62

--------------------------------
Process exited after 0.0131 seconds with return value 0
계속하려면 아무 키나 누르십시오 . . .
*/
반응형

'C, C++ > 든든한 c programming 단계별 workbook' 카테고리의 다른 글

Chapter2 중급 1  (0) 2019.08.26
Chapter 3 초급 2  (0) 2019.08.26
Chapter 3 초급 2  (0) 2019.08.24
Chapter3 초급 1  (0) 2019.08.24
Chapter 2 고급2  (0) 2019.08.24

+ Recent posts