✧‧₊˚ 아바타
✧‧₊˚

Hi!

HOME CATEGORIES TAGS ARCHIVES ABOUT
#7C82F0

증감 연산자

📅2022-08-23 📁Study›C/C++ ⏱ 1 min
1
2
3
4
5
6
7
data = 0;

++data;  // 전위(전치)
data++;  // 후위(후치)

--data;
data--;
  • 후위 연산자로 사용하는 경우, 연산자 우선순위가 가장 나중으로 밀린다.

특별한 사유가 없다면 전위로 사용하는 습관을 들이자. (실수방지)

Study, C/C++
c c++
This post is licensed under CC BY 4.0 by the author.
Share

Further Reading

Aug 27, 2022

switch case 구문과 삼항연산자

if else와 연관이 있는 switch case 구문과 삼항연산자

Aug 20, 2025

문자열 함수 모음

자주 나오는 패턴 숫자를 문자열로 바꿔서 이어 붙여서 비교 → to_string + + 문자열 길이/부분 비교 → substr, length() 정렬 기준 → sort + 람다 (a+b > b+a) 문자열 ↔ 숫자 변환 함수 용도 예시 ...

Aug 25, 2022

if else

비교 연산자 1 2 3 4 5 6 7 == != < > >= 참, 거짓 if else 구문 1 2 3 4 5 6 7 8 9 if (data == 10) { // if 조건이 참인 경우 수행 } else { // if 조건이 거짓인 경우 수행 } else if 1 2 3 4 5 6 7 8 9 10 11 12 1...

산술 연산자

논리 연산자

© 2026 Yoo-Jeong. Some rights reserved.

Using the Chirpy theme for Jekyll.

Trending Tags

c++ c tech interview pic cs music html 그래픽스 css STL

A new version of content is available.