Recent posts

[C] If, For, While, and Switch

2 minute read

If statement is composed of conditional decision statement and execution statement. If the conditional expression in If() is true, the subsequent execution s...

[C] If, For, While, and Switch 문

1 minute read

If문은 조건 판단문과 실행문으로 구성된다. If()안의 조건식이 참이면 이후 실행문을 수행하고 거짓이면 실행하지 않는다. If와 함께 사용되는 else는 If() 조건식이 거짓일때, 혹은 상위 조건식이 실행되지 않으면 수행된다. 여러 조건을 탐색하는 경우, else if () 문...

[C] 변수와 함수의 선언

2 minute read

C언어 기반으로 코드를 작성할 때 변수나 함수를 사용하게 된다. 이들은 정의와 함께 선언되는데, 선언되는 위치와 양식에 따라 다른 동작을 하기 때문에 이해할 필요가 있다. 변수의 경우 선언하는 위치에 따라 2가지 종류로 나눌 수 있다. 첫 번째는 전역변수이고, 다른 하나는 지역 변...

[C] 관계, 논리, 그리고 삼항연산자

less than 1 minute read

c 언어에서 참/거짓은 각각 0이 아닌 값과 0에 대응된다. 연산자를 통해 참/거짓을 판단하는 조건 식은 주로 if, for, while 문에서 활용되며, 관계 및 논리 연산자를 통해 표현된다. 비교 연산자는 값의 크기를 비교하거나 값의 일치 여부를 확인하기 위해 사용되고, 논리 ...

[C] Declaration of variables and functions

2 minute read

When writing code based on the C language, variables or functions are used. These are declared with definitions, and they need to be understood because they ...