<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.0">Jekyll</generator><link href="https://alchemicsh.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://alchemicsh.github.io/" rel="alternate" type="text/html" /><updated>2022-02-09T11:25:28+00:00</updated><id>https://alchemicsh.github.io/feed.xml</id><title type="html">SoftTrack Security Blog</title><subtitle>This site contains various infosec issues and lectures and etc.</subtitle><author><name>Code S</name></author><entry><title type="html">[Visual Studio 2019] scanf() 함수 사용 시, 컴파일 에러 일시적 해결법!</title><link href="https://alchemicsh.github.io/visual_studio_2019/Visual-Studio-2019-scanf()-error/" rel="alternate" type="text/html" title="[Visual Studio 2019] scanf() 함수 사용 시, 컴파일 에러 일시적 해결법!" /><published>2021-08-02T00:00:00+00:00</published><updated>2021-08-02T00:00:00+00:00</updated><id>https://alchemicsh.github.io/visual_studio_2019/Visual-Studio-2019-scanf()-error</id><content type="html" xml:base="https://alchemicsh.github.io/visual_studio_2019/Visual-Studio-2019-scanf()-error/">&lt;p class=&quot;notice&quot;&gt;안녕하세요! 🙋‍♂️ Code S 입니다! &lt;br /&gt;
Visual Studio 2019 를 이용해서 처음으로 프로그래밍을 연습하는데 (특히 C언어!) scanf() 함수가 컴파일 에러가 나서 빌드를 할 수가 없는 경우에는?! 🤷‍♂️&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;scanf() 함수 사용하고 싶어용! 😂&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;본 포스팅은 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Visual Studio 2019&lt;/code&gt;를 기준으로 합니다.&lt;/p&gt;

&lt;p&gt;처음 C언어를 공부하시는 분들은 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;scanf()&lt;/code&gt; 함수를 연습하고자 코드를 작성하고 컴파일을 하게 되면 다음과 같은 에러 메시지를 확인할 수 있습니다.&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1sjpPTFOlHsSfhlhR4EDNxMVeBmphuRGQ&quot; alt=&quot;scanf()_error_01&quot; /&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1JKHHyz3bJfXdkulRRUe8nmyqKDpsalt0&quot; alt=&quot;scanf()_error_02&quot; /&gt;&lt;/p&gt;

&lt;p&gt;아닛??!! C언어 입문책이나 문서를 살펴보면 scanf() 함수가 기본이라고 나와있는데???? 사용을 못한다곳???!!!!!!!!!! 😡🤬🤬🤬😡😡😡🤬😫&lt;/p&gt;

&lt;p&gt;그러나 사용을 하지 못하게 막아 놓은 이유가 다 있답니다!!&lt;/p&gt;

&lt;p&gt;그 이유는!!!!!!!!!!!!!!!!!!!!!!!!!! 보안에 취약하기 때문!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! (???)&lt;br /&gt;
scanf() 함수는 워낙 옛날에 나타난 함수이고, 보안 취약점 중에서 BOF(Buffer OverFlow) 취약점에 너무나도 나약한 녀석(?)이라서..,,,;; 요즘은 되도록이면 사용하지 못하게 막고 있는 것이랍니다람쥐….!!!!!!&lt;/p&gt;

&lt;p&gt;하지만, 정말 초보자 분들은 scanf() 함수부터 차근차근 프로그래밍 공부를 하는 것이 가장(!) 좋은 방법이기에~ 이를 해결할 방법을 소개해 드리고자 합니다!&lt;/p&gt;

&lt;p&gt;1️⃣ 자신의 프로젝트 속성으로 이동을 합니다.&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=16Kz-N0E24dUe3H69pMBQdxDMW7XTNO5T&quot; alt=&quot;scanf()_error_03&quot; /&gt;&lt;/p&gt;

&lt;p&gt;2️⃣ [C/C++] -&amp;gt; [일반] 메뉴를 선택하고, 목록 中 [SDL 검사] 목록으로 이동하여 [아니요(/sdl-)]를 선택하고 확인을 눌러줍니다.&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1-tIqDJ7V0pHgMQY3xfjN9v-0AV8prp3Z&quot; alt=&quot;scanf()_error_04&quot; /&gt;&lt;/p&gt;

&lt;p&gt;3️⃣ 그리고 다시 컴파일을 진행하고 빌드를 하게 되면 정상적으로 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;scanf()&lt;/code&gt; 함수를 사용할 수 있는 것을 확인할 수 있습니다! 😁&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1tWwZvqHZ8p46HqrVxTdBEAYwqVTT0Sch&quot; alt=&quot;scanf()_error_05&quot; /&gt;&lt;/p&gt;

&lt;p&gt;이제 여러분은 다시 C언어 공부를 진행할 수 있게 되었습니다!!!!!!!!!!!!!!!! (짝짝짝!!!!!!!!!)&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1tFQSR_7w4N0p3cNldjWmgv0O0OHtUCwU&quot; alt=&quot;짝짝짝!&quot; /&gt;&lt;/p&gt;

&lt;p&gt;끝. (End.)&lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt;&lt;a href=&quot;#&quot; class=&quot;btn btn--primary align-right&quot;&gt;맨 위로 이동하기&lt;/a&gt;&lt;/p&gt;</content><author><name>Code S</name></author><category term="Visual_Studio_2019" /><category term="VisualStudio" /><category term="VisualStudio2019" /><category term="Microsoft" /><summary type="html">안녕하세요! 🙋‍♂️ Code S 입니다! Visual Studio 2019 를 이용해서 처음으로 프로그래밍을 연습하는데 (특히 C언어!) scanf() 함수가 컴파일 에러가 나서 빌드를 할 수가 없는 경우에는?! 🤷‍♂️</summary></entry><entry><title type="html">[C Language] 04. Standard Input in C Programming Language</title><link href="https://alchemicsh.github.io/c_language/Standard-Input-in-C-Programming-Language/" rel="alternate" type="text/html" title="[C Language] 04. Standard Input in C Programming Language" /><published>2021-07-30T00:00:00+00:00</published><updated>2021-07-30T00:00:00+00:00</updated><id>https://alchemicsh.github.io/c_language/Standard-Input-in-C-Programming-Language</id><content type="html" xml:base="https://alchemicsh.github.io/c_language/Standard-Input-in-C-Programming-Language/">&lt;p class=&quot;notice&quot;&gt;안녕하세요! 🙋‍♂️ Code S 입니다! &lt;br /&gt;
본 포스팅에서는 C 언어의 표준 입력에 대해 알아보도록 하겠습니다!&lt;/p&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;stdio.h&amp;gt;
&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[])&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
	
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;a = &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;        &lt;span class=&quot;c1&quot;&gt;// Standard Output&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;scanf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;       &lt;span class=&quot;c1&quot;&gt;// Standard Input&lt;/span&gt;
	
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;b = &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;        &lt;span class=&quot;c1&quot;&gt;// Standard Output&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;scanf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;        &lt;span class=&quot;c1&quot;&gt;// Standard Input&lt;/span&gt;
	
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%d + %d = %d&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;      &lt;span class=&quot;c1&quot;&gt;// Standard Output&lt;/span&gt;
	
	&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;0x01-standard-input&quot;&gt;0x01. Standard Input&lt;/h2&gt;

&lt;blockquote&gt;
  &lt;p&gt;표준 입력에 대해 알아보자!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3 id=&quot;0x01---1-scanf-function&quot;&gt;0x01 - 1. scanf() Function&lt;/h3&gt;

&lt;p&gt;이전 포스팅에서 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;printf() 함수&lt;/code&gt;에 대해 공부를 해보았습니다. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;printf()&lt;/code&gt;는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;출력!&lt;/code&gt;을 위한 함수였죠? 반대로 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;scanf() 함수&lt;/code&gt;는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;입력!&lt;/code&gt;을 하기 위한 함수입니닷! 😆&lt;/p&gt;

&lt;p&gt;우리가 키보드로 무엇인가를 입력받은 후에 (즉, 데이터를 입력받은 후에) 입력받은 데이터를 사용하려고 한다면 데이터를 먼저 저장을 해야겠죠? 이번 포스팅에서 배우게 될 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;scanf()&lt;/code&gt; 함수의 기본 기능 중 하나가 바로 데이터를 입력받아서 저장하는 것입니다.&lt;/p&gt;

&lt;p&gt;예를 하나 들어서, 다음과 같이 10진수 값(데이터)를 키보드로부터 하나 입력받아서 저장하려고 한다면 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;scanf()&lt;/code&gt; 함수를 다음과 같이 사용하면 됩니다.&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=16KPzMpQDrQG6BMvwxVhffgijK1VvYQbQ&quot; alt=&quot;scanf()_01&quot; /&gt;&lt;/p&gt;

&lt;p&gt;위의 예시에서 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%d&lt;/code&gt;는 앞의 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;표준 출력(Standard Output)&lt;/code&gt;에서 배웠던 서식문자이며, 뒤에 나오는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;a&lt;/code&gt;라는 변수에 데이터를 저장한다는 명령어를 보이고 있습니다.&lt;/p&gt;

&lt;p&gt;하지만, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;printf()&lt;/code&gt; 함수와 다른 점은 변수를 지정할 때, 변수 앞에 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;amp;&lt;/code&gt;라는 기호를 붙인다는 것을 알 수 있습니다.&lt;/p&gt;

&lt;p&gt;저 기호는 해당 변수가 할당된 메모리 주소를 의미하는 기호입니다. 즉, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;a&lt;/code&gt;라는 변수가 할당된 메모리의 주소에 입력값(데이터)을 저장하라는 뜻입니다.&lt;/p&gt;

&lt;p&gt;배달의 민족(!)인 우리가 음식(데이터)을 배달 주문하면, 우리집 주소로 음식이 배달되어 전달받는 것과 같은 의미입니다! 😁 (이 기호에 대한 내용은 후에 더욱 자세히 다룰 예정입니다! 😎)&lt;/p&gt;

&lt;p&gt;그럼 scanf() 함수 실습을 해보도록 하겠습니다.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;사용하는 IDE: Visual Studio 2019 (Windows 10)
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;우선 다음 예제 코드를 확인해보도록 하겠습니다.&lt;/p&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
11
12
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;stdio.h&amp;gt;
&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[])&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;age&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
	
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Input your age: &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;scanf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;age&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Your age is %d&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;age&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	
	&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1GCc0vg4XwKy5S1AoxzR9T2PerU8EKCuQ&quot; alt=&quot;scanf()_02&quot; /&gt;&lt;/p&gt;

&lt;p&gt;위 코드는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;scanf()&lt;/code&gt; 함수를 실습하기 위한 아주 간단한 예제입니다. 나이를 입력하면 입력한 나이를 출력해주는 프로그램이죠.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;age&lt;/code&gt;라는 변수를 선언하고, 10진수 값(데이터)을 입력받아 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;age&lt;/code&gt; 변수에 저장한 뒤 출력하는 간단한 코드입니다.&lt;/p&gt;

&lt;h3 id=&quot;0x01---2-format-specifiers-in-c-programming-language&quot;&gt;0x01 - 2. Format Specifiers in C Programming Language&lt;/h3&gt;

&lt;blockquote&gt;
  &lt;p&gt;printf() 에서도 서식 문자가 있었는데 이게 그대로 적용되는 건가??!!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;scanf()&lt;/code&gt; 함수 또한 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;printf()&lt;/code&gt; 함수와 같이 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;서식 문자(Format Specifiers)&lt;/code&gt;를 사용합니다.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;서식 문자(Format Specifiers)&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt; &lt;/th&gt;
      &lt;th&gt;입력 형태(Input Forms)&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;%d or %ld&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;10진수 정수 (a decimal integer)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;%u&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;10진수 정수 중 양의 정수만 표현 (unsigned decimal integer)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;%x&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;16진수 정수 (a hexadecimal integer)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;%o&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;8진수 정수 (an octal integer)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;%f or %lf&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;10진수 실수 (a floating point number for floats)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;%c&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;하나의 문자 (a single character)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;%s&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;문자열(문장) (a string)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;%e or %le&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;e 표기법에 의한 실수 (a floating point number in scientific notation)&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;위 표에 적혀있는 서식 문자만 알고 있으면 거의 모든 코드를 작성할 때 불편함은 없을 것입니다. (만약 다른 서식 문자가 필요하다면 !!!&lt;a href=&quot;https://www.google.com&quot;&gt;구글GOD&lt;/a&gt;!!! 에게 문의를 하면 됩니당! ㅎㅎ 🤣)&lt;/p&gt;

&lt;p&gt;예제 코드로 다양한 서식 문자들을 확인해보도록 하겠습니다.&lt;/p&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;stdio.h&amp;gt;
&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;agrc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[])&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;kt&quot;&gt;float&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;kt&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;10진수 정수 입력: &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;scanf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;출력하기 =&amp;gt; 10진수: %d, 16진수: %x, 8진수: %o &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;16진수 정수 입력: &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;scanf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%x&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;출력하기 =&amp;gt; 10진수: %d, 16진수: %x, 8진수: %o &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;8진수 정수 입력: &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;scanf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%o&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;출력하기 =&amp;gt; 10진수: %d, 16진수: %x, 8진수: %o &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;float형 실수 두 개 입력: &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;scanf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%f %e&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;출력하기 =&amp;gt; type_1 = %f, type_2 = %e &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;double형 실수 두 개 입력: &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;scanf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%lf %le&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;출력하기 =&amp;gt; type_1 = %lf, type_2 = %le &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1qGtHxfdfWosHfDdFueVNNxT7Heh_SiZ8&quot; alt=&quot;scanf()_03&quot; /&gt;&lt;/p&gt;

&lt;p&gt;위 예제를 통해 알 수 있듯이 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;scanf()&lt;/code&gt; 함수에서도 다양한 서식 문자를 사용할 수 있는 것을 확인할 수 있습니다! 😊&lt;/p&gt;

&lt;h2 id=&quot;0x02-conclusion&quot;&gt;0x02. Conclusion&lt;/h2&gt;

&lt;p&gt;이번 포스팅에서는 C 언어를 본격적으로 공부하면서 앞으로 여러분들이 수도 없이 사용하게 될 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;표준 입력 함수(Standard Input Function)&lt;/code&gt;에 대해 배웠습니다! 열심히 공부하는 여러분들에게 박수!!! (짝짝짝!!!)&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1wMdECl2epQkAKn7VmYlB0OcRTdWkh4CX&quot; alt=&quot;clapping_01&quot; /&gt;&lt;/p&gt;

&lt;p&gt;다음 포스팅에서는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;변수(variable)&lt;/code&gt;에 대해 알아보도록 하겠습니다! ╰(&lt;em&gt;°▽°&lt;/em&gt;)╯&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1gm2wHCGtNm8CJTbpoF77oRdeRsgutonj&quot; alt=&quot;bye_bye_01&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt;&lt;a href=&quot;#&quot; class=&quot;btn btn--primary align-right&quot;&gt;맨 위로 이동하기&lt;/a&gt;&lt;/p&gt;</content><author><name>Code S</name></author><category term="C_Language" /><category term="C" /><category term="Programming" /><summary type="html">안녕하세요! 🙋‍♂️ Code S 입니다! 본 포스팅에서는 C 언어의 표준 입력에 대해 알아보도록 하겠습니다!</summary></entry><entry><title type="html">[GitHub Pages] Jekyll 기반 블로그에서 Emoji 사용하기</title><link href="https://alchemicsh.github.io/github_pages/GitHub-Pages-Jekyll-Emoji/" rel="alternate" type="text/html" title="[GitHub Pages] Jekyll 기반 블로그에서 Emoji 사용하기" /><published>2021-05-26T00:00:00+00:00</published><updated>2021-05-26T00:00:00+00:00</updated><id>https://alchemicsh.github.io/github_pages/GitHub-Pages-Jekyll-Emoji</id><content type="html" xml:base="https://alchemicsh.github.io/github_pages/GitHub-Pages-Jekyll-Emoji/">&lt;p class=&quot;notice&quot;&gt;안녕하세요! 🙋‍♂️ Code S 입니다! &lt;br /&gt;
Jekyll 기반 블로그 (여기서는 Minimal Mistakes) 에서 이모지(Emoji)를 사용하려면??!!&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;이모지(Emoji)를 사용해보자!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;처음 깃허브를 이용해서 블로그를 만들고 글을 몇 개 작성하면서 이모지를 사용해보았습니다. 저 같은 경우에는 이모지 사이트를 찾아가서 사용하고 싶은 이모지를 복사해서 글에 붙여넣어서 사용했지만, 일부 이모지가 나타나지 않는 현상을 발견했습니다.&lt;/p&gt;

&lt;p&gt;그래서 이것 저것 찾아보다가 Jekyll 플러그인 중 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jemoji&lt;/code&gt;라는 것이 있는 것을 처음 알게 되었습니다! (진작 알았으면.. ㅠㅠ)&lt;/p&gt;

&lt;p&gt;우선, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;minimal mistakes&lt;/code&gt; 기반으로 구축된 블로그로 이야기를 하겠습니다.&lt;/p&gt;

&lt;p&gt;방법은 너무나도 간단했습니다.&lt;/p&gt;

&lt;p&gt;블로그를 구축할 때 생성되는 파일 중 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Gemfile&lt;/code&gt;과 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_config.yml&lt;/code&gt; 두 개의 파일이 있습니다. 먼저, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Gemfile&lt;/code&gt;에는..&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;group :jekyll_plugins do
	gem &quot;jemoji&quot;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;위와 같이 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jemoji&lt;/code&gt;를 추가하면 됩니다.&lt;/p&gt;

&lt;p&gt;그리고 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_config.yml&lt;/code&gt;에는..&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;# Plugins (previously gems:)
plugins:
	- jemoji
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;위와 같이 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;plugins:&lt;/code&gt; 부분에 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;- jemoji&lt;/code&gt;라고 추가하면 됩니다! 😆😆😆😆😆&lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt;&lt;a href=&quot;#&quot; class=&quot;btn btn--primary align-right&quot;&gt;맨 위로 이동하기&lt;/a&gt;&lt;/p&gt;</content><author><name>Code S</name></author><category term="GitHub_Pages" /><category term="GitHub" /><category term="Pages" /><category term="Jekyll" /><category term="Emoji" /><summary type="html">안녕하세요! 🙋‍♂️ Code S 입니다! Jekyll 기반 블로그 (여기서는 Minimal Mistakes) 에서 이모지(Emoji)를 사용하려면??!!</summary></entry><entry><title type="html">[Visual Studio 2019] 프로세스 ~ 이(가) 종료되었습니다. 라는 문구 없애기</title><link href="https://alchemicsh.github.io/visual_studio_2019/Visual-Studio-2019-CMD-Option/" rel="alternate" type="text/html" title="[Visual Studio 2019] 프로세스 ~ 이(가) 종료되었습니다. 라는 문구 없애기" /><published>2021-05-26T00:00:00+00:00</published><updated>2021-05-26T00:00:00+00:00</updated><id>https://alchemicsh.github.io/visual_studio_2019/Visual-Studio-2019-CMD-Option</id><content type="html" xml:base="https://alchemicsh.github.io/visual_studio_2019/Visual-Studio-2019-CMD-Option/">&lt;p class=&quot;notice&quot;&gt;안녕하세요! 🙋‍♂️ Code S 입니다! &lt;br /&gt;
Visual Studio 2019 를 처음 설치하고 프로그래밍을 처음 시작해보려고 하는데, 명령 프롬프트(cmd.exe) 창에 “프로세스 ~ 이(가) 종료되었습니다.” 라는 문장이 출력되면?! 🤷‍♂️&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;“프로세스 ~ 이(가) 종료되었습니다.” 문구를 없애보자!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;본 포스팅은 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Visual Studio 2019&lt;/code&gt;를 기준으로 합니다.&lt;/p&gt;

&lt;p&gt;처음 프로그래밍을 시작하려고 예제 코드를 입력하고 컴파일하고 실행까지 딱! 했는데..???!!&lt;br /&gt;
다음과 같은 화면을 본 적이 있을 것입니다.&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1QCasdhOUcz7VmF1bbhy62yZ1b1uiHGjN&quot; alt=&quot;Visual_Studio_2019_Debugging_01&quot; /&gt;&lt;/p&gt;

&lt;p&gt;실행 화면 창(명령 프롬프트 창)에 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;프로세스 ~ 이(가) 종료되었습니다.&lt;/code&gt;라는 문장이 뜨는데.. 이게 불편하지 않으면 굳이 없애지 않아도 좋지만 이 문장은 기본적으로 특수 문자 중 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;줄 바꿈('\n')&lt;/code&gt;을 실행하고 문장이 나타납니다.&lt;/p&gt;

&lt;p&gt;따라서 처음에 프로그래밍 문법을 익히면서 실행을 시키고 다른 책이나 강의에 나타나는 결과 화면과 다르게 나타나게 되어 혼란이 올 수도 있습니다.&lt;/p&gt;

&lt;p&gt;그러므로 이 문장이 나타나지 않도록 하는 것이 처음에 프로그래밍 공부를 할 때는 가장 좋다고 볼 수 있습니다.&lt;/p&gt;

&lt;p&gt;한 번 이 문장을 없애보도록 하겠습니다! 🙇‍♂️&lt;/p&gt;

&lt;p&gt;:one: 먼저 맨 위에 보기 중에서 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[도구(T)]&lt;/code&gt; 를 누르고, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[옵션(O)]&lt;/code&gt;을 선택합니다.&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=11Ge2hwBp6lYgl86wkbP9zuD5EzuFxnZ4&quot; alt=&quot;Visual_Studio_2019_CMD_Option_Step_01&quot; /&gt;&lt;/p&gt;

&lt;p&gt;:two: 그 다음, 나타나는 창에서 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[디버깅]&lt;/code&gt; -&amp;gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[일반]&lt;/code&gt;을 선택하고 맨 밑으로 스크롤을 내린 뒤 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;디버깅이 중지되면 자동으로 콘솔 닫기&lt;/code&gt;를 체크합니다. 그리고 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[확인]&lt;/code&gt;을 눌러 설정을 저장합니다! 끝!!!!!! (쉽죠?? ㅎㅎ 🤣)&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=173UEB7d4--LYQyD9EScn2jS-zdQC-yZ7&quot; alt=&quot;Visual_Studio_2019_CMD_Option_Step_02&quot; /&gt;&lt;/p&gt;

&lt;p&gt;설정이 모두 끝났습니다! 이제 다시 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[Ctrl] + [F5]&lt;/code&gt;를 눌러서 실행을 해보면..??!!&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1WyxzmBHA77RXwpJAw9RJgLqCb-PJrtfQ&quot; alt=&quot;Visual_Studio_2019_Debugging_02&quot; /&gt;&lt;/p&gt;

&lt;p&gt;문장이 사라진 것을 확인할 수 있습니다!!!&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1e80CUVowsfbMQgekxnNuqplr7l1JprcU&quot; alt=&quot;짝짝짝!&quot; /&gt;&lt;/p&gt;

&lt;p&gt;끝. (End.)&lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt;&lt;a href=&quot;#&quot; class=&quot;btn btn--primary align-right&quot;&gt;맨 위로 이동하기&lt;/a&gt;&lt;/p&gt;</content><author><name>Code S</name></author><category term="Visual_Studio_2019" /><category term="VisualStudio" /><category term="VisualStudio2019" /><category term="Microsoft" /><summary type="html">안녕하세요! 🙋‍♂️ Code S 입니다! Visual Studio 2019 를 처음 설치하고 프로그래밍을 처음 시작해보려고 하는데, 명령 프롬프트(cmd.exe) 창에 “프로세스 ~ 이(가) 종료되었습니다.” 라는 문장이 출력되면?! 🤷‍♂️</summary></entry><entry><title type="html">[GitHub Pages] Code Block에 줄 번호(Line Number) 출력하기</title><link href="https://alchemicsh.github.io/github_pages/GitHub-Pages-Code-Block-Line-Number/" rel="alternate" type="text/html" title="[GitHub Pages] Code Block에 줄 번호(Line Number) 출력하기" /><published>2021-05-25T00:00:00+00:00</published><updated>2021-05-25T00:00:00+00:00</updated><id>https://alchemicsh.github.io/github_pages/GitHub-Pages-Code-Block-Line-Number</id><content type="html" xml:base="https://alchemicsh.github.io/github_pages/GitHub-Pages-Code-Block-Line-Number/">&lt;p class=&quot;notice&quot;&gt;안녕하세요! 🙋‍♂️ Code S 입니다! &lt;br /&gt;
깃허브(GitHub)로 웹호스팅(GitHub Pages)하고 있는데, 코드 블럭(Code Block)에 줄 번호(Line Number) 어떻게 출력할까요???&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;줄 번호를 내놔라! (Where is my Line Number in Code Block?)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GitHub Pages&lt;/code&gt;를 이용해서 웹호스팅을 이용하는 분들은 쉽게 웹 블로그 혹은 웹 페이지를 하나 간단하게 만들 수 있는 것을 확인할 수 있습니다. 매우 편리하고 사용하기도 쉽죠.&lt;/p&gt;

&lt;p&gt;그리고 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;마크 다운(MarkDown)&lt;/code&gt; 문서를 이용해서 글을 작성을 할 수 있죠! 여기서 문제가 발생합니다..&lt;/p&gt;

&lt;p&gt;만약 프로그래밍 관련 글을 작성하려고 코드 블럭(Code Block)을 사용했는데, 줄 번호(Line Number)를 같이 출력하고 싶지만, 처음에는 그 기능을 사용할 수 없어서 조금 불편함이 존재하죠.&lt;/p&gt;

&lt;p&gt;그래서 그 사용법을 알려드리고자 합니다. 매우 간단합니다! 😆&lt;/p&gt;

&lt;p&gt;웹 블로그를 목적으로 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;깃허브 페이지(GitHub Pages)&lt;/code&gt;를 이용한다면, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jekyll&lt;/code&gt; 기반으로 만들어지기 때문에 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_config.yml&lt;/code&gt;이라는 파일이 존재할 것입니다.&lt;/p&gt;

&lt;p&gt;이 파일을 열고, 맨 마지막 줄에 가서 다음 코드를 입력만 하면 끝입니다! (너무 간단하죠?? ㅎㅎ 🤣)&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;markdown: kramdown
kramdown:
    highlighter: rouge
    syntax_highlighter_opts:
        block:
            line_numbers: true
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;그리고 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Push&lt;/code&gt;를 한 다음 사이트에 접속해서 확인을 해보면 줄 번호(Line Number)가 코드 블럭(Code Block)에 뜨는 것을 확인할 수 있습니다! 👍😁😎&lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt;&lt;a href=&quot;#&quot; class=&quot;btn btn--primary align-right&quot;&gt;맨 위로 이동하기&lt;/a&gt;&lt;/p&gt;</content><author><name>Code S</name></author><category term="GitHub_Pages" /><category term="GitHub" /><category term="Pages" /><summary type="html">안녕하세요! 🙋‍♂️ Code S 입니다! 깃허브(GitHub)로 웹호스팅(GitHub Pages)하고 있는데, 코드 블럭(Code Block)에 줄 번호(Line Number) 어떻게 출력할까요???</summary></entry><entry><title type="html">[C Language] 03. Standard Output in C Programming Language</title><link href="https://alchemicsh.github.io/c_language/Standard-Output-in-C-Programming-Language/" rel="alternate" type="text/html" title="[C Language] 03. Standard Output in C Programming Language" /><published>2021-05-20T00:00:00+00:00</published><updated>2021-05-20T00:00:00+00:00</updated><id>https://alchemicsh.github.io/c_language/Standard-Output-in-C-Programming-Language</id><content type="html" xml:base="https://alchemicsh.github.io/c_language/Standard-Output-in-C-Programming-Language/">&lt;p class=&quot;notice&quot;&gt;안녕하세요! 🙋‍♂️ Code S 입니다! &lt;br /&gt;
본 포스팅에서는 C 언어의 표준 출력에 대해 알아보도록 하겠습니다!&lt;/p&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;stdio.h&amp;gt;
&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[])&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Hello World!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;     &lt;span class=&quot;c1&quot;&gt;// 출력 함수 (C 언어 표준 출력)&lt;/span&gt;
	&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;0x01-standard-output&quot;&gt;0x01. Standard Output&lt;/h2&gt;

&lt;blockquote&gt;
  &lt;p&gt;표준 출력에 대해 알아보자!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3 id=&quot;0x01---1-printf-function&quot;&gt;0x01 - 1. printf() Function&lt;/h3&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;printf()&lt;/code&gt; 함수는 이전 포스팅 중 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C 언어의 기본 구조&lt;/code&gt;편에서 한 번 보았을 것입니다. 이 함수는 큰따옴표(&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;&quot;&lt;/code&gt;)로 묶인 내용을 모니터에 출력해주는 역할을 수행합니다. 그래서 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;Hello World!&quot;&lt;/code&gt; 같은 내용도 출력할 수 있는 것이죠~ ㅎㅎ (이는 앞선 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C 언어 소개&lt;/code&gt;편에서 실제 컴파일을 하여 실행하는 것까지 실습을 진행했었습니다. 😁)&lt;/p&gt;

&lt;p&gt;만약 다른 내용을 출력하고 싶으면 큰따옴표(&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;&quot;&lt;/code&gt;) 안의 내용을 바꿔주기만 하면 됩니다.&lt;/p&gt;

&lt;p&gt;이 함수는 C 언어에서는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;표준 출력 함수(Standard Output Function)&lt;/code&gt;이므로, 앞서 배웠던 전처리기를 이용한 헤더 파일 선언 중 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;stdio.h&lt;/code&gt; 를 헤더 파일로 선언을 해야만 사용을 할 수가 있습니다. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;stdio.h&lt;/code&gt;의 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;stdio&lt;/code&gt;가 바로 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Standard Input and Output&lt;/code&gt;의 줄임말이기 때문이죠!&lt;/p&gt;

&lt;p&gt;그럼 printf() 함수 실습을 해보도록 하겠습니다.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;사용하는 IDE: Visual Studio 2019 (Windows 10)
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c1&quot;&gt;// 첫 번째 printf()&lt;/span&gt;

&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;stdio.h&amp;gt;
&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[])&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Hello World!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	
	&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c1&quot;&gt;// 두 번째 printf()&lt;/span&gt;

&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;stdio.h&amp;gt;
&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[])&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Hello World!&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	
	&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;위와 같이 두 개의 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;printf()&lt;/code&gt; 실습 예제가 있습니다. 두 코드의 차이점이 무엇인지 확인했나요?&lt;/p&gt;

&lt;p&gt;그렇다면 두 코드를 모두 입력하고 실행해보도록 하겠습니다!&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=19LmXyLLmhQEmhdRoihC5i46OGyMata0E&quot; alt=&quot;printf() function_01&quot; /&gt;&lt;/p&gt;

&lt;p&gt;차이점이 바로 보이죠? 바로 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;'\n'&lt;/code&gt; 입니다! ㅎㅎ&lt;/p&gt;

&lt;p&gt;단지 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;'\n'&lt;/code&gt;를 추가했을 뿐인데, 출력 결과가 깔끔하게 나타나는 것을 확인할 수 있습니다.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;'\n'&lt;/code&gt;는 현재 커서를 한 줄 아래로 옮기는 역할을 합니다. 즉, 우리가 문서 작성할 때 다음 줄에 입력을 하기 위해 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Enter&lt;/code&gt;키를 입력하는 것과 같은 역할을 하는 것이죠.&lt;/p&gt;

&lt;p&gt;다시 정리해보자면, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;printf()&lt;/code&gt; 함수가 큰따옴표(&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;&quot;&lt;/code&gt;) 안의 내용들을 차례대로 화면에 출력을 하다가 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;'\n'&lt;/code&gt;을 만나게 되면 바로 다음 줄로 바꿔서 출력을 하게 되는 것입니다.&lt;/p&gt;

&lt;p&gt;이렇게 특수한 역할을 수행하는 문자들을 우리는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;특수 문자(Escape Sequence)&lt;/code&gt;라고 부릅니다.&lt;/p&gt;

&lt;h3 id=&quot;0x01---2-escape-sequences-in-c-programming-language&quot;&gt;0x01 - 2. Escape Sequences in C Programming Language&lt;/h3&gt;

&lt;blockquote&gt;
  &lt;p&gt;C 언어에서는 다양한 특수 문자를 사용할 수 있다!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;C 언어에서 사용할 수 있는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;특수 문자(Escape Sequence)&lt;/code&gt;는 다음 표와 같습니다.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;특수 문자(Escape Sequence)&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt; &lt;/th&gt;
      &lt;th&gt;설명(Character represented)&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;\a&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;경고음 발생 (Alert; Beep, Bell)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;\b&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;백스페이스 (Backspace)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;\f&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;폼 피드 (Form Feed)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;\n&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;개행 (New Line), 키보드의 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Enter&lt;/code&gt; 키 효과!&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;\r&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;캐리지 리턴 (Carriage Return)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;\t&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;수평 탭 (Horizontal Tab), 키보드의 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Tab&lt;/code&gt; 키 효과!&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;\v&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;수직 탭 (Vertical Tab)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;\\&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;역슬래시 (Backslash)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;\’&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;작은따옴표 (Apostrophe or Single Quotation Mark)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;\”&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;큰따옴표 (Double Quotation Mark)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;\?&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;물음표 (Quesion Mark)&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;이 특수문자는 다 외우지 않아도 괜찮습니다. 필요할 때마다 참고해서 사용하면 되기 때문이죠~ ㅎㅎ (외우고 있기 귀찮기도 하공.. 😅)&lt;/p&gt;

&lt;p&gt;예제를 통해 직접 확인해보도록 하겠습니다!&lt;/p&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
11
12
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;stdio.h&amp;gt;
&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[])&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Hello World! &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\t&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; Hello! &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n\t&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; My name is Code S! &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;역슬래시: &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;작은따옴표: &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\'&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\'&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;큰따옴표: &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;물음표: \? &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1hS1rbvVKcCrtglVqQ8tgR2Z9-gvpKS-U&quot; alt=&quot;printf_escape_sequence_result&quot; /&gt;&lt;/p&gt;

&lt;p&gt;위 예제코드를 입력해보면 위와 같은 결과를 확인할 수 있습니다! 꼭 실습을 통해 직접 경험해보는 것이 가장 중요합니다! 😉&lt;/p&gt;

&lt;h3 id=&quot;0x01---3-format-specifiers-in-c-programming-language&quot;&gt;0x01 - 3. Format Specifiers in C Programming Language&lt;/h3&gt;

&lt;p&gt;다음으로 살펴볼 것은 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;서식 문자(Format Specifiers)&lt;/code&gt;입니다. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;printf() 함수&lt;/code&gt;는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Print Formatted&lt;/code&gt;라고 해서 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;print&lt;/code&gt;에 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;f&lt;/code&gt;를 추가하여 이름을 지었으며, 그 만큼 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;서식화된 문자(서식 문자)&lt;/code&gt;에 따라 다양한 출력 형식을 가지게 됩니다.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;서식 문자&lt;/code&gt;란 출력 형태를 지정해 주는 문자를 뜻합니다. 예를 들어..&lt;/p&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;위와 같은 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;printf()&lt;/code&gt; 예제가 있다면, 이 뜻은 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;출력 화면에 %d를 출력해주세요!&lt;/code&gt;가 아니라, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;뒤에 있는 1+2 의 결과값은 3 이라는 것을 10진수로 표현해서 출력해주세요!&lt;/code&gt;라는 뜻입니다. 10진수는 영어로 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Decimal&lt;/code&gt;이라고 하죠. 네. 바로 10진수 영어 표현의 맨 앞글자인 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;D&lt;/code&gt;를 따와서 만든 서식 문자입니닷! ㅎㅎ&lt;/p&gt;

&lt;p&gt;그렇다면 16진수, 8진수는 어떻게 표현할까요? 16진수는 영어로 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;HeXadecimal&lt;/code&gt;, 8진수는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Octal&lt;/code&gt;이니까.. 각각 알파벳 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;o&lt;/code&gt; 를 이용하여 서식 문자인 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%x&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%o&lt;/code&gt;가 됩니다! (간단하죠? 😆)&lt;/p&gt;

&lt;p&gt;이처럼 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;printf() 함수&lt;/code&gt;는 단순히 문자 또는 문자열을 출력해주는 역할만 하는 것이 아닙니다. 이렇게 숫자 계산 결과도 출력할 수 있고, 이를 다양한 표현 방식으로 출력할 수가 있습니다. 그럼 이 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;서식 문자&lt;/code&gt;를 어떻게 사용하는지 예제와 함께 차근차근 알아보도록 하겠습니다! 🙋‍♂️&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;서식 문자(Format Specifiers)&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt; &lt;/th&gt;
      &lt;th&gt;출력 형태(Output Forms)&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;%d or %ld or %i or %li&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;10진수 정수 (a decimal integer)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;%u&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;10진수 정수 중 양의 정수만 표현 (unsigned decimal integer)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;%x&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;16진수 정수 (a hexadecimal integer)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;%o&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;8진수 정수 (an octal integer)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;%f and %lf&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;10진수 실수 (a floating point number for floats)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;%e&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;e 표기법에 의한 실수 (a floating point number in scientific notation)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;%E&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;E 표기법에 의한 실수 (a floating point number in scientific notation)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;%g or %G&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;소수점 이하 자리 수에 따라 %f, %e 둘 중 하나 선택 (Similar as %f or %lf or %e or %E)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;%c&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;하나의 문자 (a single character)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;%s&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;문자열(문장) (a string)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;%%&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;% 기호 출력 (the % symbol)&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;blockquote&gt;
  &lt;p&gt;다양한 숫자를 출력해보자!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;먼저 예제 코드를 살펴보도록 하겠습니다!&lt;/p&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;stdio.h&amp;gt;
&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[])&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;※ %%d, %%i 사용해보기! ※&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%d + %d = %d &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%i + %i = %i &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;90&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;30&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;90&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%d - %d = %d &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%i - %i = %i &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;80&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;30&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;80&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;※ 16진수(%%x), 8진수(%%o) 사용해보기! ※&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;10진수: %d, 16진수: %x, 8진수: %o &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;But, 16진수와 8진수는 음수 표현 불가! &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;10진수: %d, 16진수: %x, 8진수: %o &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;※ %%f, %%lf 사용해보기! ※&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;10진수 정수: %d &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;10진수 실수: %f &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;10진수 실수: %lf &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;기본적으로 소수점 6자리 까지만 표현: %f&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1234567&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;기본적으로 소수점 6자리 까지만 표현: %f&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1234564&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;기본적으로 소수점 6자리 까지만 표현: %lf&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1234567&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;기본적으로 소수점 6자리 까지만 표현: %lf&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1234564&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1rQFlBtTwLDX8HwbRa6FhO-oeWumtLgtY&quot; alt=&quot;number_output_test_result&quot; /&gt;&lt;/p&gt;

&lt;p&gt;다음과 같이 예제 코드를 입력하고 컴파일한 뒤 실행해보면 다음과 같은 결과가 나타나는 것을 확인할 수 있습니다.&lt;/p&gt;

&lt;p&gt;먼저, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%d&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%i&lt;/code&gt;를 사용한 예제 코드를 확인해보도록 하겠습니다.&lt;/p&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;※ %%d, %%i 사용해보기! ※&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%d + %d = %d &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%i + %i = %i &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;90&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;30&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;90&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%d - %d = %d &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%i - %i = %i &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;80&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;30&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;80&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1QHKbokPXIWoM01nBNW_doznI5OmIKIbU&quot; alt=&quot;printf_explain_01&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%d&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%i&lt;/code&gt; 모두 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;10진수 정수 (양의 정수와 음의 정수)&lt;/code&gt;를 표현하는 것을 확인할 수 있습니다. 물론 보통 프로그래밍을 할 때 10진수 정수를 표현하려면 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%d&lt;/code&gt;를 가장 많이 사용합니다.&lt;/p&gt;

&lt;p&gt;다음으로 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;16진수(%x), 8진수(%o)&lt;/code&gt;를 사용한 예제 코드를 확인해보도록 하겠습니다.&lt;/p&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;※ 16진수(%%x), 8진수(%%o) 사용해보기! ※&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;10진수: %d, 16진수: %x, 8진수: %o &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;But, 16진수와 8진수는 음수 표현 불가! &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;10진수: %d, 16진수: %x, 8진수: %o &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;10진수인 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;25&lt;/code&gt;를 각각 16진수와 8진수로 표현을 한 예제 코드입니다. 양의 정수의 경우에는 16진수, 8진수 모두 표현이 가능하지만, 음의 정수의 경우 16진수와 8진수로는 표현이 불가한 것을 확인할 수 있습니다.&lt;/p&gt;

&lt;p&gt;다음은 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%f&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%lf&lt;/code&gt;를 사용한 예제 코드를 확인해보도록 하겠습니다.&lt;/p&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;※ %%f, %%lf 사용해보기! ※&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;10진수 정수: %d &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;10진수 실수: %f &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;10진수 실수: %lf &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;기본적으로 소수점 6자리 까지만 표현: %f&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1234567&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;기본적으로 소수점 6자리 까지만 표현: %f&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1234564&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;기본적으로 소수점 6자리 까지만 표현: %lf&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1234567&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;기본적으로 소수점 6자리 까지만 표현: %lf&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1234564&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;먼저, 3 ~ 5번 라인의 코드를 확인해보도록 하겠습니다.&lt;br /&gt;
저는 이 예제 코드에서 실수인 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0.5&lt;/code&gt;를 표현하는 것으로 코드를 작성을 했는데, 결과 화면을 보게되면 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%d&lt;/code&gt; 서식 문자를 이용하여 실수를 표현하려고 하면 표현이 되지 않는 것을 확인할 수 있습니다. 그러므로 실수를 표현하려면 무조건 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%f&lt;/code&gt;나 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%lf&lt;/code&gt;를 사용하는 것이 맞습니다.&lt;/p&gt;

&lt;p&gt;다음으로 6 ~ 9번 라인의 코드를 확인해보도록 하겠습니다.&lt;br /&gt;
위 결과화면과 같이 실수를 표현하는 서식 문자인 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%f&lt;/code&gt;와 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%lf&lt;/code&gt;는 기본적으로 소수점 6자리까지 표현을 하게 되며, 6자리를 넘기는 수를 표현하려고 하면 반올림 또는 반내림 현상이 발생해서 오차가 생기게 됩니다. 그래서 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0.1234567&lt;/code&gt;을 표현하게 되면 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0.123457&lt;/code&gt;로 표현되고, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0.1234564&lt;/code&gt;를 표현하게 되면 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0.123456&lt;/code&gt;으로 출력이 되는 것입니다.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;문자와 문자열을 출력해보자!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;이번에는 문자와 문자열을 어떻게 출력하는 것인지 확인해보도록 하겠습니다.&lt;br /&gt;
먼저 예제 코드를 살펴보도록 하겠습니다.&lt;/p&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
11
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;stdio.h&amp;gt;
&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[])&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%c %c %c %c %c %c &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sc&quot;&gt;'a'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sc&quot;&gt;'A'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sc&quot;&gt;'b'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sc&quot;&gt;'B'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sc&quot;&gt;'c'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sc&quot;&gt;'C'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%c %s %c. &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sc&quot;&gt;'A'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;is the uppercase letter of the lowercase letter&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sc&quot;&gt;'a'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%s = %d %s &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;3 * 5&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;입니당!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=14nc5vFOWyjfcL0xk-B7vYe2n3190xbL-&quot; alt=&quot;character_and_string_test_result&quot; /&gt;&lt;/p&gt;

&lt;p&gt;예제 코드와 결과 화면은 위와 같습니다.&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=12UAu25L_k4kipL70nP6pQgA3Y1xG4j-1&quot; alt=&quot;printf_explain_02&quot; /&gt;&lt;/p&gt;

&lt;p&gt;코드를 잘 확인해보면 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%c&lt;/code&gt;는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;문자(character)&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%s&lt;/code&gt;는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;문자열(string)&lt;/code&gt;을 뜻합니다. 그리고 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;printf() 함수&lt;/code&gt;에서 표현을 하려면 문자는 작은따옴표(&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;''&lt;/code&gt;), 문자열은 큰따옴표(&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;&quot;&lt;/code&gt;)를 사용하는 것을 알 수 있습니다.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;10진수 정수 (양의 정수)를 출력해보자! - %u&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;이미 앞에서 10진수 정수를 표현하는 서식 문자인 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%d&lt;/code&gt;와 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%i&lt;/code&gt;에 대해서 배웠죠? ㅎㅎ 이번에는 또 다른 10진수 정수를 표현하는 서식 문자인 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%u&lt;/code&gt;에 대해 알아보도록 하겠습니다!&lt;/p&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;stdio.h&amp;gt;
&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[])&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%u &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4294967295&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%d &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2147483647&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%d &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2147483650&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=19vVIc2v2jfTrcWNTOFkv43xUEsLNFzj5&quot; alt=&quot;printf_explain_03&quot; /&gt;&lt;/p&gt;

&lt;p&gt;무슨 차이인지는 잘 모르겠죠? ㅎㅎ 이것은 좀 더 뒤에 배울 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;자료형(Data Type)&lt;/code&gt;에서 배우게 되는 내용이지만 간단히 알아보도록 하겠습니다.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%d&lt;/code&gt;는 10진수 정수 범위인 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;-2,147,483,648 ~ 2,147,483,647&lt;/code&gt;을 표현할 수 있는 것이고, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%u&lt;/code&gt;는 10진수 정수 범위 중 양의 정수 범위만 표현할 수 있지만 음의 정수 범위를 표현 못하는 대신에 양의 정수 범위를 두 배까지 표현할 수 있습니다.&lt;/p&gt;

&lt;p&gt;즉, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%u&lt;/code&gt;는 10진수 정수 범위인 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0 ~ 4,294,967,295&lt;/code&gt;을 표현할 수 있는 것이죠! 😆&lt;/p&gt;

&lt;p&gt;우선은 이 정도까지만 알아보도록 하겠습니다. 좀 더 자세한 내용은 나중에 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;자료형(Data Type)&lt;/code&gt;에 대해서 배울 때 알아보도록 하겠습니다!&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;출력할 때 숫자 칸을 지정해서 나타나게 하는 방법은 없을까?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;앞으로 프로그래밍을 하면서 다양한 숫자를 출력하게 되면 깔끔하게 보이기 위해 숫자들의 칸을 미리 지정해서 같은 칸에 나타나듯이 출력하고 싶은 경우가 생길 것입니다. 다음과 같이 말이죠.&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=19V1HFtk3eRfUDrUSZf1TwHXUm28yY5ut&quot; alt=&quot;printf_explain_04&quot; /&gt;&lt;/p&gt;

&lt;p&gt;C언어에서도 이와 같이 미리 칸을 지정해서 출력이 가능합니다! 이를 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;데이터 필드(Data Field)&lt;/code&gt;라고 이야기합니다. 서식 문자에 옵션을 하나 추가하면 이 데이터 필드의 폭을 조절을 할 수가 있습니다. 예제 코드를 보면서 알아보도록 하겠습니다!&lt;/p&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;stdio.h&amp;gt;
&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[])&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%05d, %05d, %05d &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;999&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;9999&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;99999&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%-5d, %-5d, %-5d &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;999&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;9999&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;99999&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%+5d, %+5d, %+5d &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;999&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;9999&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;99999&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%+5d, %+5d, %+5d &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;999&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;9999&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;99999&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

	&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1ndeM8uVmvAOcp3av_eqlpoMvB9qY9kCh&quot; alt=&quot;printf_data_field_test_result&quot; /&gt;&lt;/p&gt;

&lt;p&gt;위와 같이 예제 코드와 결과 화면이 있습니다. 한 줄 한 줄 알아보도록 하겠습니다.&lt;/p&gt;

&lt;p&gt;먼저, 4번 라인을 살펴보겠습니다. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%05d&lt;/code&gt;라고 제가 서식 문자를 사용한 것을 확인할 수 있습니다. 이는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;데이터 필드(Data Field)를 5칸을 미리 확보하고 오른쪽 정렬로 출력하며 남은 자리는 0으로 채운다&lt;/code&gt;라는 뜻입니다. 그래서 결과 화면을 보면 남은 자리에 숫자 0을 채워넣는 것을 확인할 수 있죠~ ㅎㅎ&lt;/p&gt;

&lt;p&gt;그 다음, 8번 라인을 살펴보겠습니다. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%-5d&lt;/code&gt;라고 적혀 있습니다. 무슨 뜻일까요? 이는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;데이터 필드(Data Field)를 5칸을 미리 확보하고 왼쪽 정렬해서 출력한다&lt;/code&gt;라는 뜻입니다. 그래서 결과 화면을 보면 왼쪽으로 정렬되어 있는 것을 확인할 수 있습니다!&lt;/p&gt;

&lt;p&gt;마지막으로 12 ~ 13번 라인을 살펴보겠습니다. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%+5d&lt;/code&gt; 라고 적혀있죠! 이는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;데이터 필드(Data Field)를 5칸을 미리 확보하고 오른쪽 정렬로 출력하며 양수의 경우 +, 음수의 경우 - 부호를 붙인다&lt;/code&gt;라는 뜻입니다. 마찬가지로 결과 화면을 보게되면 양수는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;+&lt;/code&gt;, 음수는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;-&lt;/code&gt; 부호를 붙여서 출력되는 것을 확인할 수 있죠! 😁&lt;/p&gt;

&lt;h2 id=&quot;0x02-conclusion&quot;&gt;0x02. Conclusion&lt;/h2&gt;

&lt;p&gt;이번 포스팅에서는 C 언어를 본격적으로 공부하면서 앞으로 여러분들이 수도 없이 사용하게 될 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;표준 출력 함수(Standard Output Function)&lt;/code&gt;에 대해 배웠습니다! 열심히 공부하는 여러분들에게 박수!!! (짝짝짝!!!)&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1sr3Z3OPbwBO8EkeL_sUmrC94Zj8QNiUC&quot; alt=&quot;clapping_01&quot; /&gt;&lt;/p&gt;

&lt;p&gt;다음 포스팅에서는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;표준 입력 함수(Standard Input Function)&lt;/code&gt;에 대해 알아보도록 하겠습니다! ╰(&lt;em&gt;°▽°&lt;/em&gt;)╯&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1EMJDO8HS9GMba0oHCYzOQBB8zl4OktW-&quot; alt=&quot;bye_bye_01&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt;&lt;a href=&quot;#&quot; class=&quot;btn btn--primary align-right&quot;&gt;맨 위로 이동하기&lt;/a&gt;&lt;/p&gt;</content><author><name>Code S</name></author><category term="C_Language" /><category term="C" /><category term="Programming" /><summary type="html">안녕하세요! 🙋‍♂️ Code S 입니다! 본 포스팅에서는 C 언어의 표준 출력에 대해 알아보도록 하겠습니다!</summary></entry><entry><title type="html">[C Language] 02. Basic Structure of C Programming Language</title><link href="https://alchemicsh.github.io/c_language/Basic-Structure-of-C-Programming-Language/" rel="alternate" type="text/html" title="[C Language] 02. Basic Structure of C Programming Language" /><published>2021-05-10T00:00:00+00:00</published><updated>2021-05-10T00:00:00+00:00</updated><id>https://alchemicsh.github.io/c_language/Basic-Structure-of-C-Programming-Language</id><content type="html" xml:base="https://alchemicsh.github.io/c_language/Basic-Structure-of-C-Programming-Language/">&lt;p class=&quot;notice--warning&quot;&gt;안녕하세요! 🙋‍♂️ Code S 입니다!&lt;br /&gt;
본 포스팅에서는 C언어의 기본적인 구조에 대해 설명합니다!&lt;/p&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;cm&quot;&gt;/*
	File name: helloworld.c
	Writter: Code S
	Contents: Output Test of the Plain Text(&quot;Hello World!&quot;)
*/&lt;/span&gt;

&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;stdio.h&amp;gt;   // preprocessor
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// main function&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[])&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Hello World!&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// Output function&lt;/span&gt;
	&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;👨‍💻 위 예제를 이용해서 본 포스팅을 진행하도록 하겠습니다.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어(C Programming Language)&lt;/code&gt;는 위 예제와 같이 기본 구조가 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;주석(Comment)&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;전처리기(Preprocessor)와 헤더 파일(Header File)&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;메인 함수(Main Function)&lt;/code&gt;으로 구성되어 있습니다.&lt;/p&gt;

&lt;p&gt;하나씩 차근차근 알아보도록 하겠습니다! 🙋‍♂️&lt;/p&gt;

&lt;h2 id=&quot;0x01-preprocessor-and-header-file&quot;&gt;0x01. Preprocessor and Header File&lt;/h2&gt;

&lt;blockquote&gt;
  &lt;p&gt;전처리기? 헤더 파일? 이게 뭐지? 😵&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3 id=&quot;0x01---1-what-is-preprocessor&quot;&gt;0x01 - 1. What is Preprocessor?&lt;/h3&gt;

&lt;p&gt;흔히 대학교 전공 중, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;컴퓨터 공학(Computer Engineering)&lt;/code&gt;이나 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;컴퓨터 과학(Computer Science)&lt;/code&gt;에서 배우게 되는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;전처리기(Preprocessor)&lt;/code&gt;는 입력되는 데이터를 처리하여 다른 프로그램에 대한 입력으로서 사용되는 출력물을 만들어내는 프로그램이라고 배우게 됩니다.&lt;/p&gt;

&lt;p&gt;간단히 말하자면, 다음 그림과 같이 당근 주스를 만드려고 하는데..&lt;br /&gt;
당근이 손질되어 있지 않으면 만들 수 없으니까~ 우선 당근을 손질하고 손질된 당근으로 당근 주스를 만드는 과정에서 당근을 손질해주는 기계를 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;전처리기&lt;/code&gt;라고 볼 수 있는 겁니다! (그래서 식당에 있는 주방에 들어가보면 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;전처리실&lt;/code&gt;이라고 따로 식재료 손질하는 곳이 존재하기도 하죠! ㅎㅎ)&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1pXd8OnCbq1DcAREejXNNtUJqCJVeYoc5&quot; alt=&quot;explain_preprocessor&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C 언어(C Language)&lt;/code&gt;에서의 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;전처리기(Preprocessing)&lt;/code&gt;또한 같은 개념입니다.&lt;/p&gt;

&lt;p&gt;우선, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;프로그래밍(Programming)&lt;/code&gt;에서 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;전처리기&lt;/code&gt;는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;컴파일&lt;/code&gt; 직전에 실행되는 컴파일러의 별도의 프로그램으로, 전처리기가 실행되면 각 소스 코드에서 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;지시자(Directives)&lt;/code&gt;를 찾게 됩니다.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;지시자(Directives)&lt;/code&gt;는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C 언어&lt;/code&gt;에서 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;#&lt;/code&gt; 을 이용해서 선언하게 됩니다.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;#include&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;#define&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;#ifdef&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;#endif&lt;/code&gt;, 기타 등등..&lt;/p&gt;

&lt;p&gt;이러한 여러가지 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;전처리기&lt;/code&gt; 중에서 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;#include&lt;/code&gt;에 대해서 우선 배워보도록 하겠습니다.&lt;/p&gt;

&lt;h3 id=&quot;0x01---2-what-is-header-file&quot;&gt;0x01 - 2. What is Header File?&lt;/h3&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;전처리기(Preprocessor)&lt;/code&gt;를 배우고 이 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;전처리기&lt;/code&gt;를 사용하려면 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;지시자(Directives)&lt;/code&gt;를 선언해야한다는 것을 배웠습니다. 그리고 그 중에서 기본적으로 무!조!건! 알아야 하는 것이 바로..&lt;br /&gt;
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;#include&lt;/code&gt; 입니다.&lt;/p&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;stdio.h&amp;gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;위와 같은 코드를 보고 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어&lt;/code&gt;에서는.. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;헤더 파일(Header File) 중 표준 헤더 파일인 [stdio.h]를 선언했다&lt;/code&gt;라고 이야기 합니다.&lt;/p&gt;

&lt;p&gt;그렇다면, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;헤더 파일&lt;/code&gt;은 무엇일까요?&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;헤더 파일(Header File)&lt;/code&gt;은 확장자 중 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.h or .H&lt;/code&gt;를 갖는 파일을 지칭하며, 이 중 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;표준 헤더 파일(Standard Header File)&lt;/code&gt;은 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;표준 라이브러리 함수(Standard Library Function)&lt;/code&gt;들의 동작을 따로 정의해 놓은 파일을 의미합니다.  (읭? 😵)&lt;/p&gt;

&lt;p&gt;무슨 말이냐?! 하면.. 우리가 C언어로 프로그래밍을 할 때, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;printf()&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;scanf()&lt;/code&gt;와 같은 것들을 입력하는 것을 보았을 것입니다. 이 포스팅 맨 위에 적혀있는 예제 코드에서도 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;printf()&lt;/code&gt;가 있죠?&lt;/p&gt;

&lt;p&gt;이것을 C언어에서는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;함수(Function)&lt;/code&gt;이라고 부르고, 이러한 기본적인 함수(표준 라이브러리 함수)들이 정의되어있어서 우리가 쉽게 사용할 수 있도록 편리성을 제공하는 것이 바로 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;헤더 파일(Header File)&lt;/code&gt;입니다!&lt;/p&gt;

&lt;p&gt;헤더 파일을 선언할 때, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/code&gt;처럼 꺽쇠 기호(&amp;lt;&amp;gt;)를 이용하는 경우를 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;시스템 헤더 파일(System Header File)&lt;/code&gt;이라고 부르고, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;myheader.h&quot;&lt;/code&gt;처럼 큰따옴표(““)를 이용하는 경우를 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;사용자 정의 헤더 파일(User Defined Header File)&lt;/code&gt;이라고 부릅니다.&lt;/p&gt;

&lt;p&gt;이 둘의 차이점은 사전에 시스템에서 제공하느냐 사용자가 필요에 의해서 개발하느냐에 따라 다릅니다.&lt;/p&gt;

&lt;h2 id=&quot;0x02-function&quot;&gt;0x02. Function&lt;/h2&gt;

&lt;blockquote&gt;
  &lt;p&gt;함수(Function)란 무엇인가? 😱&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3 id=&quot;0x02---1-what-is-function-basic&quot;&gt;0x02 - 1. What is Function? (Basic)&lt;/h3&gt;

&lt;p&gt;학교를 다닐 때, 한 번 쯤 이런 그림을 본 적이 있을 것입니다.&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1_-OI1MyXmh0vA6xzOuOdh4cTVwCw1VxX&quot; alt=&quot;function_example&quot; /&gt;&lt;/p&gt;

&lt;p&gt;이것이 바로 함수입니다!&lt;/p&gt;

&lt;p&gt;예를 들어 설명하자면,&lt;br /&gt;
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;나는 천재다!&lt;/code&gt;라는 문장을 출력하고 싶을 때, 이를 직접 구현하려면 많은 코드를 작성을 해야해서 힘들기 때문에 (실제로 엄청 힘듭니다;; ^^;;) &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;함수(Function)&lt;/code&gt;를 만들어서 쉽게 기능을 구현할 수 있도록 하는 것이죠.&lt;/p&gt;

&lt;p&gt;그래서 문장을 출력하려면..&lt;/p&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;나는 천재다!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;이렇게만 하면 아주 간단하게 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;기능&lt;/code&gt;을 사용할 수 있죠! ㅎㅎ&lt;/p&gt;

&lt;h3 id=&quot;0x02---2-main-function&quot;&gt;0x02 - 2. main() function&lt;/h3&gt;

&lt;p&gt;함수가 무엇인지 대략적으로 살펴봤으니 이제 예제 코드에 있는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main&lt;/code&gt; 함수에 대해 알아보도록 하겠습니다.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;main() 함수는 프로그램 실행 시 운영체제(OS; Operating System)에 의해서 맨 처음 호출되고 맨 나중에 종료되는 함수이다.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main()&lt;/code&gt; 함수는 프로그램이 실행될 때 가장 먼저 호출이 되는 함수입니다. 이 함수는 운영체제가 호출을 하며, C 프로그램의 경우 소스 파일을 컴파일하고 링크해서 만든 실행 파일(&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.exe&lt;/code&gt;)을 실행하면 운영체제가 실행 파일 내의 main() 함수를 가장 먼저 호출하기로 사전에 약속되어 있습니다.&lt;/p&gt;

&lt;p&gt;C언어로 작성된 프로그램은 무!조!건! main() 함수를 반드시 가지고 있습니다!&lt;/p&gt;

&lt;p&gt;main() 함수의 선언 형태는 다음과 같이 나타낼 수 있습니다.&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1k6F33Nush6ii7o30MXNKpFxByAsUKWSN&quot; alt=&quot;main_function_structure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;위 그림을 보면 간단하게 이해가 될 것입니다.&lt;/p&gt;

&lt;p&gt;그럼 하나 씩 살펴보도록 하겠습니다.&lt;/p&gt;

&lt;p&gt;먼저, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;int&lt;/code&gt;는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;integer&lt;/code&gt;의 줄임말로 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;정수&lt;/code&gt;를 뜻합니다. 네.. 맞습니다! 여러분이 초등학교, 중학교, 고등학교 때 배웠던 수학에서 말하는 그 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;정수&lt;/code&gt; 맞습니다!&lt;/p&gt;

&lt;p&gt;이해되셨죠? ㅎㅎ&lt;/p&gt;

&lt;p&gt;결국 예제 코드에 적혀 있는 메인 함수는 간단히 풀이해보면 여러 입력&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(int argc, char* argv[])&lt;/code&gt;을 받아서 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main() 함수&lt;/code&gt;를 호출한 후에 출력은 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;정수(int형)&lt;/code&gt;로 하라는 의미입니다.&lt;/p&gt;

&lt;p&gt;다음은 함수의 기능을 기술한 main() 함수의 기본 구조를 나타낸 것입니다.&lt;/p&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[])&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// 함수의 시작&lt;/span&gt;
	 &lt;span class=&quot;c1&quot;&gt;// 함수가 어떤 기능을 할 것인지 기술하는 곳!&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// 함수의 종료&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;위 코드와 같이 함수의 시작은 중괄호 열기 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;{&lt;/code&gt;로 시작하고 중괄호 닫기 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;}&lt;/code&gt;로 종료하게 됩니다. 이는 C언어 프로그래밍을 할 때 기본적인 약속이므로 꼭 기억하고 있어야 합니다!&lt;/p&gt;

&lt;p&gt;이 중괄호 사이에는 함수가 어떤 기능을 할 것인지 기술을 하게 됩니다.&lt;/p&gt;

&lt;p&gt;실제로 함수가 호출되었을 때 해야 하는 기능을 정의하는 영역이죠!  (이를 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;함수의 기능 영역&lt;/code&gt;이라고 부르도록 하겠습니다.)&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;헤더 파일&lt;/code&gt;에 대해 잠깐 살펴보았을 때, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;printf()&lt;/code&gt; 라는 함수도 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;메인 함수&lt;/code&gt;와 똑같이 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;stdio.h&lt;/code&gt;라는 헤더파일에 정의되어 있어서 우리가 편리하게 가져다가 쓸 수 있는 것이랍니다.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;세미콜론(;)은 문장의 끝을 의미하는 마침표와도 같은 존재!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;함수의 기능 영역에서 잘 살펴보면 세미콜론(;)이 보이는 것을 확인할 수 있습니다. 편지나 보고서와 같은 글을 쓸 때 여러분은 문장이 끝났다는 의미로 마침표(.)를 찍습니다. 이처럼 C언어에서 세미콜론은 연산을 수행하는 문장의 끝을 나타내는 마침표를 의미합니다.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;return 은 반환과 종료의 의미를 갖는다!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;함수의 기능 영역에서 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;return&lt;/code&gt; 의 의미는 두 가지 의미를 가지고 있는데, 하나는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;함수를 호출한 영역으로 값을 반환한다&lt;/code&gt;는 의미이고, 다른 하나는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;지금 이 함수를 종료한다&lt;/code&gt;는 의미입니다.&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=14Re365_fPa1u8Tkhrt94C2WVPww2EylK&quot; alt=&quot;return_explain&quot; /&gt;&lt;/p&gt;

&lt;p&gt;이렇게 간략하게 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main() 함수&lt;/code&gt;에 대해 살펴보았습니다. 아직 이해는 잘 안되겠지만 지금은 C언어의 기본적인 구조를 파악하는 것이 우선이기 때문에 여기까지만 설명하도록 하겠습니다.&lt;/p&gt;

&lt;h2 id=&quot;0x03-comment&quot;&gt;0x03. Comment&lt;/h2&gt;

&lt;blockquote&gt;
  &lt;p&gt;주석(Comment)에 대해 알아보자!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;예제 코드에 보면 다음과 같이 적혀있는 것을 확인할 수 있습니다.&lt;/p&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;cm&quot;&gt;/*
	File name: helloworld.c
	Writter: Code S
	Contents: Output Test of the Plain Text(&quot;Hello World!&quot;)
*/&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;이것이 바로 주석입니다!!!! ㅎㅎ&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;주석(Comment)&lt;/code&gt;이란 프로그램의 내용을 설명하고 프로그래머가 작성하는 메모를 의미합니다. 한 줄 주석은 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;//&lt;/code&gt;로 시작을 하고, 여러 줄 주석은 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/*&lt;/code&gt;로 시작하고 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;*/&lt;/code&gt;로 끝납니다.&lt;/p&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c1&quot;&gt;// 한 줄 주석&lt;/span&gt;

&lt;span class=&quot;cm&quot;&gt;/* 여러 줄 주석_01
여러 줄 주석_02
여러 줄 주석_03
*/&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;이러한 주석이 필요한 이유는 무엇일까요?&lt;/p&gt;

&lt;p&gt;바로 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;협동(Teamwork)&lt;/code&gt; 때문입니다. 여러분이 회사에 프로그래머로 취직을 하게 되면 다양한 사람들과 소스 코드를 공유하면서 작업을 하게 되는데, 이 때 아무런 설명도 없으면 신입 프로그래머는 이해를 하기 힘들겠죠? 그래서 코드에 직접 메모를 해서 이 부분이 무엇인지 설명을 하기 위해 주석을 사용하는 것입니다.&lt;/p&gt;

&lt;p&gt;앞으로 여러분이 프로그램 코드 작성을 할 때 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;주석&lt;/code&gt;을 잘 활용하면 다른 사람들과도 공유하고 피드백도 받을 수 있는 좋은 프로그램 코드를 작성할 수 있게 되는 것입니다! 😆&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;주석 처리 시 주의 사항은?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;주석을 사용할 때, 여러 줄 주석(&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/* */&lt;/code&gt;)은 중복해서 사용을 하면 오류가 발생하게 됩니다. 만약 중복해서 주석을 사용하고 싶다면 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;//&lt;/code&gt;을 사용해야 합니다.&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1cvdSvCFY9b_m89GNx3Ft3ryLYLbaF9E-&quot; alt=&quot;return_explain&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;0x04-conclusion&quot;&gt;0x04. Conclusion&lt;/h2&gt;

&lt;p&gt;지금까지 C언어의 기본 구조에 대해 알아보았습니다. 여기까지 잘 따라오신 여러분에게 박수!!! (짝짝짝!)&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1HuZq8wIeYN6lNFY5wbcbYQ6QoGiVSKid&quot; alt=&quot;Hand Clap&quot; /&gt;&lt;/p&gt;

&lt;p&gt;앞으로 C언어를 배우는 길에서 꼭 알아야하는 것이기 때문에 잘 기억할 수 있도록 공부하셔야 합니다!&lt;/p&gt;

&lt;p&gt;그럼 다음 포스팅으로 만날게요! ω༼’͡•-͡•༽ω&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=15sTfKooSbxMkkdsMmdysoDKcJ_ORioGm&quot; alt=&quot;Bye Bye&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt;&lt;a href=&quot;#&quot; class=&quot;btn btn--primary align-right&quot;&gt;맨 위로 이동하기&lt;/a&gt;&lt;/p&gt;</content><author><name>Code S</name></author><category term="C_Language" /><category term="C" /><category term="Programming" /><summary type="html">안녕하세요! 🙋‍♂️ Code S 입니다! 본 포스팅에서는 C언어의 기본적인 구조에 대해 설명합니다!</summary></entry><entry><title type="html">[C Language] 01. Introduction</title><link href="https://alchemicsh.github.io/c_language/Start-C-Language/" rel="alternate" type="text/html" title="[C Language] 01. Introduction" /><published>2021-02-16T00:00:00+00:00</published><updated>2021-02-16T00:00:00+00:00</updated><id>https://alchemicsh.github.io/c_language/Start-C-Language</id><content type="html" xml:base="https://alchemicsh.github.io/c_language/Start-C-Language/">&lt;p class=&quot;notice&quot;&gt;안녕하세요! 🙋‍♂️ Code S 입니다! &lt;br /&gt;
본 포스팅에서는 C언어가 무엇인지에 대해 알아보고, &lt;br /&gt;
어떻게 C언어를 시작할 수 있는지에 대한 방법을 알려드립니다!&lt;/p&gt;

&lt;h2 id=&quot;0x01-what-is-c-programming-language&quot;&gt;0x01. What is C Programming Language?&lt;/h2&gt;

&lt;blockquote&gt;
  &lt;p&gt;컴퓨터랑 대화를 할 수 있다고?! 😲🤩&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;stdio.h&amp;gt;
&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[])&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;hello world!&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;가장 기본적인 프로그래밍 언어인 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C Programming Language&lt;/code&gt;(a.k.a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어&lt;/code&gt;)는 1972년 미국의 벨 연구소(Bell Labs)에서 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;데니스 리치(Dennis M. Ritchie)&lt;/code&gt;가 개발한 프로그래밍 언어입니다.&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=191J8_waHqwMsfu2N3m7fhRSyfU6uvNFY&quot; alt=&quot;Dennis_Ritchie&quot; width=&quot;300px&quot; height=&quot;450px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;처음에 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어&lt;/code&gt;는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;UNIX&lt;/code&gt; 라는 운영체제(Operating System)와 호환되는 다양한 프로그램을 개발하기 위해 사용되었습니다.&lt;/p&gt;

&lt;p&gt;그리고 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어&lt;/code&gt;를 토대로 다양한 프로그래밍 언어(예를 들어 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C++&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Java&lt;/code&gt; 등등)가 발전하면서 다양한 프로그램들이 만들어지게됩니다.&lt;/p&gt;

&lt;h2 id=&quot;0x02-history-of-c-programming-language&quot;&gt;0x02. History of C Programming Language&lt;/h2&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어&lt;/code&gt;라는 정말 좋은 언어가 탄생하기 전에도 다른 프로그래밍 언어가 존재하고 있었습니다.&lt;/p&gt;

&lt;p&gt;대표적으로 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;포트란(Fortran)&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;코볼(COBOL)&lt;/code&gt;이라는 언어가 존재했지만, 일반적으로 사용하기에는 매우 어려운 상황이었습니다.&lt;/p&gt;

&lt;p&gt;그러다가 1958년에 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ALGOL(Algorithmic Language)&lt;/code&gt;라고 하는 언어가 등장을 하게 됩니다. 이 언어는 알고리즘의 연구개발, 수치 계산과 논리 연산에 이용하기 위한 목적으로 만들어졌으며 알골(Algol)계 컴퓨터에서 동작을 하였습니다.&lt;/p&gt;

&lt;p&gt;1960년에는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ALGOL 60&lt;/code&gt;이 등장했고, 이 언어로부터 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어&lt;/code&gt;의 역사가 시작된다고 보면 됩니다.&lt;/p&gt;

&lt;p&gt;이 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ALGOL 60&lt;/code&gt;이라는 언어에서 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CPL(Combined Programming Language)&lt;/code&gt;이라는 언어가 탄생을 했고, 또 다시 1967년에 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;BCPL(Basic CPL)&lt;/code&gt;이라는 언어를 개발했습니다. 그리고 이 언어가 미국으로 가더니 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;켄 톰슨(Ken Thompson)&lt;/code&gt;이라는 벨 연구소의 한 프로그래머에 의해 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;B언어 (B Language)&lt;/code&gt;로 탄생하게 됩니다!&lt;br /&gt;
(아이고 복잡해라…😵)&lt;/p&gt;

&lt;p&gt;흠흠..&lt;br /&gt;
그리고 드디어!! &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;B언어&lt;/code&gt;를 거쳐서 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어&lt;/code&gt;가 탄생하게 됩니다!!!! (짝짝짝!!!)😆&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1oNh45SKDvWUuaO0Dl_o9qI1IU_72TiXp&quot; alt=&quot;Hand Clap&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어&lt;/code&gt;의 대략적인 탄생 순서에 대해 살펴보면 다음과 같은 순서가 되겠습니다!&lt;/p&gt;

&lt;p align=&quot;cneter&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1yVm506BP0jshtrxqxHo_AQ71tp3mat7N&quot; alt=&quot;History_of_C&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;0x03-c-the-most-powerful-programming-language-in-the-world&quot;&gt;0x03. C, The most powerful Programming Language in the world!&lt;/h2&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어&lt;/code&gt;는 이후에 등장한 다양한 프로그래밍 언어에 직간접적으로 많은 영향을 주었고 이로 인해 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어&lt;/code&gt;를 알고 있으면 다른 언어도 알기 쉽다는 말이 생겨나게 됩니다. 즉, 프로그래밍 언어의 세계에서 공통어로서의 역할을 한다고 볼 수 있죠!&lt;/p&gt;

&lt;p&gt;그러면 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어&lt;/code&gt;는 어디에 사용되는 것일까요? 바로 핵심적인 응용 프로그램에는 다 쓰이게 됩니다!&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어&lt;/code&gt;는 임베디드 시스템(Embedded System)에 자주 사용됩니다.&lt;/li&gt;
  &lt;li&gt;시스템 애플리케이션을 개발하거나 운용체제 내의 응용 프로그램을 개발하는데 사용됩니다.&lt;/li&gt;
  &lt;li&gt;현재 우리가 많이 사용하고 있는 웹 브라우저인 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;구글 크롬(Google Chrome)&lt;/code&gt;의 전신인 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Google's Chromium&lt;/code&gt;은 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어&lt;/code&gt;로 개발되었습니다.&lt;/li&gt;
  &lt;li&gt;데이터베이스 구조 질의어인 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SQL&lt;/code&gt; 중 가장 유명하고 많이 사용되는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MySQL&lt;/code&gt; 또한 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어&lt;/code&gt;로 개발되었습니다.&lt;/li&gt;
  &lt;li&gt;스티브 잡스가 설립한 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;애플(Apple)&lt;/code&gt; 회사에서 개발한 운영체제인 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MAC OS X&lt;/code&gt;도 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어&lt;/code&gt;를 기반으로 만들어졌습니다.&lt;/li&gt;
  &lt;li&gt;기타 등등&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;이렇게 수 많은 애플리케이션, 수 많은 운영체제가 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어&lt;/code&gt;를 통해 개발되었습니다. 결국 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어&lt;/code&gt;는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;프로그래밍 언어의 어머니&lt;/code&gt;라고 보아도 무방할 정도로 그 영향력이 어마어마 합니다!&lt;/p&gt;

&lt;h3 id=&quot;0x03---1-how-c-programming-language-works&quot;&gt;0x03 - 1. How C Programming Language Works?&lt;/h3&gt;

&lt;p&gt;그렇다면 이렇게 엄청난 프로그래밍 언어인 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어&lt;/code&gt;는 어떻게 동작을 하는 것일까요?&lt;/p&gt;

&lt;p&gt;바로 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;컴파일(Compile)&lt;/code&gt;을 통해 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Object File&lt;/code&gt;로 변환되어 컴퓨터가 프로그래머가 원하는 동작을 수행할 수 있게 되는 겁니다.&lt;/p&gt;

&lt;p&gt;이러한 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;컴파일&lt;/code&gt;을 수행하도록 도와주는 프로그램을 우리는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;컴파일러(Compiler)&lt;/code&gt;라고 부릅니다.&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1H-GE2U6PUioVgtOQDdd3sL3VLnZuXU_6&quot; alt=&quot;process_of_compile&quot; /&gt;&lt;/p&gt;

&lt;p&gt;위 그림에서 볼 수 있듯이 간단하게 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;컴파일&lt;/code&gt;이라는 것은 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;컴파일러&lt;/code&gt;에 의해 컴퓨터가 실제로 읽을 수 있는 말로 바꿔주는 과정을 뜻합니다.&lt;/p&gt;

&lt;p&gt;이렇게 해서 우리는 컴퓨터와 서로 소통을 할 수 있게 되는 것이죠! 😆😆😆&lt;/p&gt;

&lt;h2 id=&quot;0x04-lets-start-programming-with-c&quot;&gt;0x04. Let’s start programming with C!&lt;/h2&gt;

&lt;blockquote&gt;
  &lt;p&gt;이제 직접 컴퓨터랑 대화를 해보자!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;그러면 본격적으로! &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어&lt;/code&gt;를 이용하여 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;프로그래밍(Programming)&lt;/code&gt;을 시작해보겠습니다!&lt;/p&gt;

&lt;p&gt;먼저, 컴파일러를 준비해야 하는데… 엄청 다양한 컴파일러들이 존재합니다.&lt;/p&gt;

&lt;p&gt;예를 들어, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gcc/g++&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Visual C/C++&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Turbo C/C++&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Eclipse CDT&lt;/code&gt; 등등..&lt;/p&gt;

&lt;p&gt;많은 종류가 있지만, 본 포스팅에서는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Visual C/C++&lt;/code&gt;을 이용하는 방법을 알려드리도록 하겠습니다!&lt;/p&gt;

&lt;h3 id=&quot;0x04---1-using-visual-studio&quot;&gt;0x04 - 1. Using Visual Studio&lt;/h3&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Visual Studio&lt;/code&gt;는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;마이크로소프트(Microsoft)&lt;/code&gt;에서 만들어졌으며, 프로그램 소스코드(Source Code)를 작성할 수 있는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;에디터(Editor)&lt;/code&gt;와 작성한 소스코드를 프로그램으로 만들어주는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;컴파일러(Compiler)&lt;/code&gt; 등이 묶여있는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;통합 개발 환경(IDE, Integrated Development Environment)&lt;/code&gt; 소프트웨어 입니다.&lt;/p&gt;

&lt;p&gt;이 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;IDE&lt;/code&gt;에 포함된 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;컴파일러&lt;/code&gt;가 바로 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Visual C/C++&lt;/code&gt;입니다!&lt;/p&gt;

&lt;p&gt;설치방법은 너무 간단하기 때문에 따로 설명하지는 않겠습니다. 😅&lt;/p&gt;

&lt;p&gt;설치를 완료하였다면!&lt;br /&gt;
지금부터 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Visual Studio&lt;/code&gt;를 사용하여 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어 프로그래밍&lt;/code&gt;을 해보도록 하겠습니다! (본 포스팅에서는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Visual Studio 2019&lt;/code&gt;를 사용하여 설명합니다.)&lt;/p&gt;

&lt;p&gt;:one: 설치된 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Visual Studio&lt;/code&gt; 프로그램을 실행하고, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[새 프로젝트 만들기(N)]&lt;/code&gt;를 선택합니다.&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1P9eBxUQhJqDlcZM0CXMlEl4GSqQ1STIm&quot; alt=&quot;visual_studio_2019_01&quot; width=&quot;550px&quot; height=&quot;450px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;:two: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[빈 프로젝트]&lt;/code&gt; 중에서 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Windows용 C++를 사용하여 처음부터 시작합니다. 시작 파일을 제공하지 않습니다.&lt;/code&gt;라는 내용이 담겨진 프로젝트를 선택해서 만들어줍니다.&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1_xPfOK_y3VN-LwpBsk7eGe_gYVbtosEY&quot; alt=&quot;visual_studio_2019_02&quot; width=&quot;550px&quot; height=&quot;450px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;:three: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[새 프로젝트 구성]&lt;/code&gt;페이지가 나타나면, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;프로젝트 이름&lt;/code&gt;, 프로젝트를 저장할 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;위치&lt;/code&gt;를 입력하고, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;솔루션&lt;/code&gt;의 경우 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;솔루션 및 프로젝트를 같은 디렉터리에 배치(D)&lt;/code&gt;라는 문구를 체크한 뒤, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[만들기(C)]&lt;/code&gt; 버튼을 클릭해서 프로젝트를 생성합니다!&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1l1djHXAEp7mDZjKR6lmlTOFAvDXmM_P2&quot; alt=&quot;visual_studio_2019_03&quot; width=&quot;550px&quot; height=&quot;450px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;:four: 아래 그림과 같이 프로젝트가 생성되면, 화면이 나타나게 되며 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[소스 파일]&lt;/code&gt;에 마우스 오른쪽 클릭을 해서 소스 코드 파일을 추가해줍니다.&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1HtloQvNxqZQtGCyELDkLiqxgNFeqKZ-M&quot; alt=&quot;visual_studio_2019_04&quot; width=&quot;600px&quot; height=&quot;500px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;:five: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[새 항목 추가]&lt;/code&gt;라는 창이 하나 뜨게 되면, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C++ 파일(.cpp)&lt;/code&gt;를 선택하고 파일 이름의 형태는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[파일 이름.c]&lt;/code&gt;로 한 뒤, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[추가(A)]&lt;/code&gt;를 클릭합니다!&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=15688036XiXzfDnIadAE0SS1JKoUYZ2hc&quot; alt=&quot;visual_studio_2019_05&quot; width=&quot;550px&quot; height=&quot;450px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;:six: 소스 코드 파일이 새롭게 추가되고, 입력을 할 수 있게 에디터 화면에 표시가 됩니다. 그러면 아래 그림과 같이 다음의 예제 소스 코드를 입력해줍니다!&lt;/p&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;cp&quot;&gt;#include &amp;lt;stdio.h&amp;gt;
&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[])&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;hello world!&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
	&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1oQ9U3I3pnUIZqAouGzddSQS7-RJ2iNUO&quot; alt=&quot;visual_studio_2019_06&quot; width=&quot;600px&quot; height=&quot;500px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;:seven: 소스 코드 입력을 모두 마쳤으면..!! 이제 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[Ctrl + F5]&lt;/code&gt;를 눌러 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;컴파일(Compile)&lt;/code&gt;을 진행하고 생성된 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;exe 파일&lt;/code&gt;을 실행하게 되면 결과를 확인할 수 있습니다! 😆😁&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1Oa-5Sz2n4YEW6HExPE56t0oR9olWGh2p&quot; alt=&quot;visual_studio_2019_07&quot; width=&quot;800px&quot; height=&quot;700px&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;0x05-conclusion&quot;&gt;0x05. Conclusion&lt;/h2&gt;

&lt;p&gt;여기까지 따라오셔서 소스 코드가 잘 실행이 되는 화면을 보셨다면 축하드립니다!! (짝짝짝!) 👏&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1z5moRSebMC4YTjYE1z616mrn-_sNGrlW&quot; alt=&quot;Hand Clap_2&quot; width=&quot;300px&quot; height=&quot;300px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어 프로그래밍&lt;/code&gt;을 하기 위해 무조건 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Visual Studio&lt;/code&gt;만 사용할 필요는 없습니다. 이외에 다른 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;IDE&lt;/code&gt; 프로그램이 많이 존재하고 있으니 (예를 들어 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Eclipse&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Turbo&lt;/code&gt; 등등) 자신에게 맞는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;IDE&lt;/code&gt; 또는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Editor&lt;/code&gt;를 이용해서 소스 코드를 작성하시면 됩니다!&lt;/p&gt;

&lt;p&gt;그러면 다음 포스팅부터는 본격적으로 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C언어&lt;/code&gt;에 대해 배우도록 하겠습니다!  ω༼’͡•-͡•༽ω &lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1FvZWACMJPtul93yOZ8zrpy-QxxAUbYB3&quot; alt=&quot;see_you_next_time&quot; width=&quot;300px&quot; height=&quot;300px&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt;&lt;a href=&quot;#&quot; class=&quot;btn btn--primary align-right&quot;&gt;맨 위로 이동하기&lt;/a&gt;&lt;/p&gt;</content><author><name>Code S</name></author><category term="C_Language" /><category term="C" /><category term="Programming" /><summary type="html">안녕하세요! 🙋‍♂️ Code S 입니다! 본 포스팅에서는 C언어가 무엇인지에 대해 알아보고, 어떻게 C언어를 시작할 수 있는지에 대한 방법을 알려드립니다!</summary></entry><entry><title type="html">[F.T.Z] XShell or Putty 에서 한글 문자 나타내기</title><link href="https://alchemicsh.github.io/ftz/Read-Korean/" rel="alternate" type="text/html" title="[F.T.Z] XShell or Putty 에서 한글 문자 나타내기" /><published>2021-02-04T00:00:00+00:00</published><updated>2021-02-04T00:00:00+00:00</updated><id>https://alchemicsh.github.io/ftz/Read-Korean</id><content type="html" xml:base="https://alchemicsh.github.io/ftz/Read-Korean/">&lt;p class=&quot;notice&quot;&gt;안녕하세요! 🙋‍♂️ Code S 입니다! &lt;br /&gt;
본 포스팅에서는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;XShell&lt;/code&gt; 또는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Putty&lt;/code&gt;를 사용하면서 &lt;br /&gt;
한글을 읽지 못하는 현상을 해결하는 방법을 알려드립니다!  &lt;br /&gt;
해커스쿨: &lt;a href=&quot;https://www.hackerschool.org/Sub_Html/HS_Community/index.html&quot;&gt;HackerSchool.org&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;F.T.Z 접속했는데 ㅇㅙ?? ㅎㅏㄴ글이 다 ㄱㄱㅐ져서 나오지????!! ㅠㅠ&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;0x01-xshell-에서-한글-문자-나타내기&quot;&gt;0x01. XShell 에서 한글 문자 나타내기!&lt;/h2&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;XShell&lt;/code&gt;을 이용해서 드디어!!! &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;F.T.Z&lt;/code&gt;에 접속을 하고!!!!!!!!!!!!!&lt;br /&gt;
문제 함 풀어봐야쥐ㅇ!!!!&lt;br /&gt;
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$ cat hint&lt;/code&gt; 딱 입력했더니????
어라????!!&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;어라? 왜 한글이 안보이지?!&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1Cn-SeybQFIFjEcYdaqK7sYpp_3ahIhx7&quot; alt=&quot;xshell_01&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;이와 같이 한글이 제대로 보이지 않는 경우가 발생할 수 있습니다.&lt;/p&gt;

&lt;p&gt;이런 경우에는 다음과 같이 설정을 해주시면 잘 보이니 걱정하지 않으셔도 됩니당! (^_^)&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;한글 보이게 설정하기&lt;/code&gt;&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt; &lt;/th&gt;
      &lt;th&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;이제 한글을 읽을 수 있다!!!&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1wBjuvBgTmg6yd3dZeOcljdrX3fLPLTTP&quot; alt=&quot;xshell_02&quot; /&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;&lt;img src=&quot;https://drive.google.com/uc?id=11x55AClviElZD7_V4YZLHWWLSxzNzOg1&quot; alt=&quot;xshell_03&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;성공!!!!&lt;/p&gt;

&lt;p&gt;아! 만약 이렇게 설정했는데 안된다면, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;유니코드(UTF-8)&lt;/code&gt;로 설정해보시기 바랍니다!&lt;/p&gt;

&lt;h2 id=&quot;0x02-putty-에서-한글-문자-나타내기&quot;&gt;0x02. Putty 에서 한글 문자 나타내기!&lt;/h2&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Putty&lt;/code&gt;를 이용해서 드디어!!! &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;F.T.Z&lt;/code&gt;에 접속을 하고!!!!!!!!!!!!!&lt;br /&gt;
문제 함 풀어봐야쥐ㅇ!!!!&lt;br /&gt;
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$ cat hint&lt;/code&gt; 딱 입력했더니????
어라????!!&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;어라? 왜 한글이 안보이지?!&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1nndnJkLMOI74_PDjRVAxY5CdX3_EmyRi&quot; alt=&quot;putty_01&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;이와 같이 한글이 제대로 보이지 않는 경우가 발생할 수 있습니다.&lt;/p&gt;

&lt;p&gt;이런 경우에는 다음과 같이 설정을 해주시면 잘 보이니 걱정하지 않으셔도 됩니당! (^_^)&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;한글 보이게 설정하기_01&lt;/code&gt;&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt; &lt;/th&gt;
      &lt;th&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;한글 보이게 설정하기_02&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=14oBCwYcawy9JL7QomWy60wIy9MJZ1VEF&quot; alt=&quot;putty_02&quot; /&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1rJkeQnGzm7De8XMelYbmSjzTnuxmQUNa&quot; alt=&quot;putty_03&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;이제 한글을 읽을 수 있다!!!&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1ESRmgP9K_NLkr5O4mVNzB4hdciUcoC7_&quot; alt=&quot;putty_04&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;성공!!!!&lt;/p&gt;

&lt;h2 id=&quot;0x03-글을-마치며&quot;&gt;0x03. 글을 마치며..&lt;/h2&gt;

&lt;p&gt;이번 글에서는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;XShell&lt;/code&gt;과 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Putty&lt;/code&gt;를 사용할 때 한글이 보이지 않으면 어떻게 대처하는지에 대해 알아보았습니다.&lt;/p&gt;

&lt;p&gt;다음 글부터는 본격적으로 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Level 01&lt;/code&gt; 부터 시작해서 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;F.T.Z&lt;/code&gt;를 정복해 보도록 하겠습니다!&lt;br /&gt;
🙋 🙋‍♂️&lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt;&lt;a href=&quot;#&quot; class=&quot;btn btn--primary align-right&quot;&gt;맨 위로 이동하기&lt;/a&gt;&lt;/p&gt;</content><author><name>Code S</name></author><category term="FTZ" /><category term="FTZ" /><category term="HackerSchool" /><summary type="html">안녕하세요! 🙋‍♂️ Code S 입니다! 본 포스팅에서는 XShell 또는 Putty를 사용하면서 한글을 읽지 못하는 현상을 해결하는 방법을 알려드립니다! 해커스쿨: HackerSchool.org</summary></entry><entry><title type="html">[F.T.Z] HackerSchool F.T.Z 시작하기</title><link href="https://alchemicsh.github.io/ftz/Start-FTZ/" rel="alternate" type="text/html" title="[F.T.Z] HackerSchool F.T.Z 시작하기" /><published>2021-01-30T00:00:00+00:00</published><updated>2021-01-30T00:00:00+00:00</updated><id>https://alchemicsh.github.io/ftz/Start-FTZ</id><content type="html" xml:base="https://alchemicsh.github.io/ftz/Start-FTZ/">&lt;p class=&quot;notice&quot;&gt;안녕하세요! 🙋‍♂️ Code S 입니다! &lt;br /&gt;
재미있게 읽어주세용! &lt;br /&gt;
해커스쿨: &lt;a href=&quot;https://www.hackerschool.org/Sub_Html/HS_Community/index.html&quot;&gt;HackerSchool.org&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;F.T.Z 를 시작해보자&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;0x01-ftz-가-뭐지&quot;&gt;0x01. F.T.Z 가 뭐지?&lt;/h2&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;HackerSchool F.T.Z&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1CFqbELnjLX_KJEhYf8giPrrMMrpGaMuj&quot; alt=&quot;F.T.Z&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;F.T.Z (Free Training Zone) 는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;HackerSchool&lt;/code&gt; 커뮤니티에서 제공하는 리눅스 시스템 트레이닝 및 워게임(Wargame) 서비스입니다.&lt;br /&gt;
해커스쿨에 직접 접속해서 서비스를 이용하는 방법도 있지만, 간혹 서버가 불안정하여 연결이 되지 않는 경우가 있으므로 본 포스팅에서는 로컬 서버를 구축하여 문제를 푸는 방법에 대해 설명하도록 하겠습니다!&lt;/p&gt;

&lt;h2 id=&quot;0x02-ftz-시작하기&quot;&gt;0x02. F.T.Z 시작하기&lt;/h2&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;a href=&quot;https://drive.google.com/file/d/1Esc7VQhrwVd-6sYKLSjDSTx9Ub7gnKxX/view?usp=sharing&quot;&gt;F.T.Z VMware 다운로드&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;F.T.Z 로컬 서버를 구축하기 위해 위 링크를 통해 F.T.Z VMware 이미지 파일을 다운로드해서 사용합니다.&lt;/p&gt;

&lt;h3 id=&quot;0x02---1-vmware-로-ftz-구동하기&quot;&gt;0x02 - 1. VMware 로 F.T.Z 구동하기&lt;/h3&gt;

&lt;p&gt;본 포스팅에서는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;VMware Workstation&lt;/code&gt; 혹은 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;VMware Player&lt;/code&gt; 가 설치 되어있다고 가정하고 시작하도록 하겠습니다.&lt;br /&gt;
(&lt;u&gt;VMware&lt;/u&gt; 에 대해서는 👩‍💻 구글 (Google) GOD 에게 문의를 하시면 됩니당!!!! ㅎㅎ)&lt;/p&gt;

&lt;p&gt;그럼 Let’s go!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://drive.google.com/uc?id=13EgLy20GEv1k3SULKjpv8QzEaNmRSJZy&quot; alt=&quot;렛츠고&quot; /&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;여기서 저는 VMware Worksation Pro 16 으로 진행하도록 하겠습니다!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;F.T.Z 다운로드 잘 받으셨다면! 적당한 폴더에 압축을 풀어줍니다.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;저처럼 적당한 곳에 압축 풀어주면 됩니다!&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1Uj--XAcO3gR-TcUtLoTyKc3hbFk08p5e&quot; alt=&quot;압축 해제&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;그 다음 VMware 를 열고, 압축을 푼 이미지를 불러옵니다.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;VMware로 이미지 파일 불러오기_01&lt;/code&gt;&lt;/th&gt;
      &lt;th&gt; &lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;VMware로 이미지 파일 불러오기_02&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1NAoXt32tBLINiI4PbDg05L5Vj39XhHma&quot; alt=&quot;vmware_01&quot; /&gt;&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=13jjh4P2XFAMmcdsm5Xgv0SSBWZ_9xVAS&quot; alt=&quot;vmware_02&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;짜잔! 불러오기 성공!&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=15kHhhx4JTob5_7mCG34b2Y296wk5tdSI&quot; alt=&quot;vmware_03&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;옆에 목록에 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Red Hat Linux 9.0&lt;/code&gt; 이라는 항목이 생겨난 것을 확인할 수 있습니다!&lt;br /&gt;
여기까지 잘 따라왔다면 VMware 로 이미지 파일을 잘 불러온 것입니다. 👍🏻&lt;/p&gt;

&lt;p&gt;이제 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;VMware&lt;/code&gt; 에서 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Power on this virtual machine&lt;/code&gt; 을 클릭해서 이미지를 실행합니다!&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;F.T.Z 실행!!!!했는데... 오잉??????&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1iOK5xogTj0Npp5aQR91_XO4b_IyG_dRV&quot; alt=&quot;vmware_04&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;이런 창이 뜨면 그냥 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;I Copied It&lt;/code&gt;을 누르면 됩니당!&lt;/p&gt;

&lt;p&gt;잘 실행이 되면…!!!!!&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;F.T.Z 실행!!!!&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1gg_BxPKq2PtY8Y2Dk48rrSUcaa1prMUe&quot; alt=&quot;vmware_05&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;성공!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;/p&gt;

&lt;h3 id=&quot;0x02---2-ftz-접속하기&quot;&gt;0x02 - 2. F.T.Z 접속하기&lt;/h3&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;a href=&quot;https://www.netsarang.com/ko/free-for-home-school/&quot;&gt;Xshell 다운로드&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;a href=&quot;https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html&quot;&gt;putty 다운로드&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;F.T.Z 를 구동했으니 이제 접속을 해봐야겠죠????&lt;/p&gt;

&lt;p&gt;우선 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;XShell&lt;/code&gt; 또는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Putty&lt;/code&gt; 를 준비합니다.&lt;br /&gt;
(위에 링크 있어용!!!)&lt;/p&gt;

&lt;p&gt;그 다음, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;VMware&lt;/code&gt;에서 구동되고 있는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Red Hat Linux&lt;/code&gt;를 열어서 로그인을 합니다.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ftz login&lt;/code&gt;&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt; &lt;/th&gt;
      &lt;th&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;password&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;root&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;hackerschool&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ftz 로그인 후 접속 화면&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1IvlLMY9X7B74fKchAeDBjF_t5kKiMJTN&quot; alt=&quot;vmware_06&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;그 다음, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ifconfig&lt;/code&gt; 명령어를 입력하여 현재 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vmware&lt;/code&gt;로 구동되고 있는 리눅스 운영체제에서 사용 중인 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;IP 주소&lt;/code&gt;를 파악해야 합니다.&lt;br /&gt;
(&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;IP 주소&lt;/code&gt;의 경우, 구동되는 환경에 따라 다 다른 주소값을 가지게 됩니다. 자신이 구동하고 있는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;VMware&lt;/code&gt;의 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;IP 주소&lt;/code&gt;를 파악하는 것이 중요합니다.)&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;IP 주소 확인하기&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1yayBogrAMXhDI_a0cI_hKrYyC1vwxni5&quot; alt=&quot;vmware_07&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;제가 테스트하는 환경에서 구동된 리눅스에서는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;192.168.128.131&lt;/code&gt;의 주소를 가지고 있는 것을 확인하였습니다.&lt;/p&gt;

&lt;p&gt;다음으로 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;XShell&lt;/code&gt; 또는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Putty&lt;/code&gt; 중 하나의 프로그램을 선택해서 설치를 한 뒤, 실행합니다.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;XShell&lt;/code&gt;&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt; &lt;/th&gt;
      &lt;th&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Putty&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1cWMwoxjdrd4CzbuUnlsJI2BXeLxcOxtE&quot; alt=&quot;xshell&quot; /&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1d02Fotw-Rv_Fvfd8PkKriat_VIjDXaxd&quot; alt=&quot;putty&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h4 id=&quot;0x02---2---1-xshell-을-이용하여-ftz-접속하기&quot;&gt;0x02 - 2 - 1. XShell 을 이용하여 F.T.Z 접속하기&lt;/h4&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;XShell&lt;/code&gt;을 실행하면 처음에 다음과 같은 창이 하나 나타나게 됩니다.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;XShell 처음 실행하면...&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1jn_jFOaO-YSDxx1ZRdNJDtEWGvY7jGXe&quot; alt=&quot;xshell_01&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;새로 만들기&lt;/code&gt; 버튼을 클릭하면 다음과 같은 화면이 나타나며, 화면에 표시된 영역에 제가 표시한 바와 같이 입력을 하면 됩니다!&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;세션 만들기&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1hkSeQ189oZP7RhSCdJ_DMepCTtdmCZOF&quot; alt=&quot;xshell_02&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;만들어진 새로운 세션 확인&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1Fv39gWOQQ2yrFPc1AY6L0eQgxTNMJwNU&quot; alt=&quot;xshell_03&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;세션이 만들어졌다면 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;연결&lt;/code&gt;을 진행합니다.&lt;br /&gt;
연결을 진행하게 되면, 처음 연결 이후에 또 연결할 시에 필요한 호스트 인증 키를 저장하겠다는 창이 나타나게 되고 이를 수락하겠냐는 물음이 나타나게 됩니다.&lt;br /&gt;
이 때는 무조건 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;수락 및 저장&lt;/code&gt;을 누르시면 됩니다.&lt;br /&gt;
어차피 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;F.T.Z&lt;/code&gt; 문제를 모두 정복할 때까지 계속 접속을 할 것이기 때문에 미리 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Key&lt;/code&gt;를 저장해두는 것이 편리합니다.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;호스트 키 저장!&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1_N4-k2nlthKpw4_IhAr1Cd5CKdDAOhV7&quot; alt=&quot;xshell_04&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;그 다음, 로그인 할 사용자 이름을 입력하는 창이 나타나게 됩니다.&lt;br /&gt;
우선, 제대로 연결이 되는지 확인하기 위해 다음과 같이 입력하고 연결이 되는지 확인합니다!&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;로그인 사용자 이름&lt;/code&gt;&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt; &lt;/th&gt;
      &lt;th&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Password&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;level1&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;level1&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;로그인 ID 입력&lt;/code&gt;&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt; &lt;/th&gt;
      &lt;th&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Password 입력&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1Ix93YSu8riaS5fc0rAZt3IsXs66lnsjK&quot; alt=&quot;xshell_05&quot; /&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1KBGx5620_bRmILMrgDG8uYqhsI4uBTGq&quot; alt=&quot;xshell_06&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;입력을 모두 마치면…!! 드디어 연결이 된 것을 확인할 수 있습니다!!! 😆😆😁&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;F.T.Z 연결 완료!&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1UHdne4CM9bEu5DgAhRMHUm2vv1cOxMuW&quot; alt=&quot;xshell_07&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h4 id=&quot;0x02---2---2-putty-을-이용하여-ftz-접속하기&quot;&gt;0x02 - 2 - 2. Putty 을 이용하여 F.T.Z 접속하기&lt;/h4&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Putty&lt;/code&gt;를 실행하면 다음과 같은 화면이 나타납니다.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Putty 첫 실행 화면&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1cC8Znj9qt37oNzY3p2nc0aynKbq6OXc1&quot; alt=&quot;putty_01&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;화면을 확인했으면 다음과 같이 입력을 진행하고 연결을 해보도록 합니다! 👨‍💻&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;연결할 세션 정보 입력하기&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1LUtxGIgMP6nuyYoYRg6DFreNtbDuITtg&quot; alt=&quot;putty_02&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;연결!!!!!!!!!! 하는데?????????
다음과 같이 알림창이 뜨면&amp;gt;?!!!
OK!! &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[예(Y)]&lt;/code&gt;를 클릭합니다!&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;알림창이 뜨면...!&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1CgVogmlQUP8MXthh3Eppcj4spesvo9dV&quot; alt=&quot;putty_03&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;그러면 드디어 연결??!! 이 아니라 연결할 때 사용할 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ID&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Password&lt;/code&gt;를 입력해줍니다! ㅎㅎ&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;로그인 사용자 이름&lt;/code&gt;&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt; &lt;/th&gt;
      &lt;th&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Password&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;level1&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt; &lt;/td&gt;
      &lt;td&gt;level1&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;연결 성공!&lt;/code&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1xrl6kVaOvctGJZZ63wSdQ8MkVpWltguz&quot; alt=&quot;putty_04&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;성공!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
&lt;img src=&quot;https://drive.google.com/uc?id=1JAIu_zavfTWEhQ01OcrkdTn2tUsYwpN1&quot; alt=&quot;성공이닷!&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;0x03-마치며&quot;&gt;0x03. 마치며..&lt;/h2&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;XShell&lt;/code&gt; 을 사용하든 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Putty&lt;/code&gt;를 사용하든 연결만 되면 끝!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;여기까지 읽고 잘 따라오신 여러분에게 박수를 보내드립니다!! (짝짝짝!)🙌🙌🙌&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1gbrFd-Ukq6kMA8Fl7E7gno0qQK3aaV2U&quot; alt=&quot;짝짝짝&quot; width=&quot;350px&quot; height=&quot;342px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;다음 포스팅부터는 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;F.T.Z&lt;/code&gt;의 문제들에 대해 어떻게 접근하고 해결해 나아가야 하는지를 설명하도록 하겠습니다!!! 🙋🙋‍♂️&lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt;&lt;a href=&quot;#&quot; class=&quot;btn btn--primary align-right&quot;&gt;맨 위로 이동하기&lt;/a&gt;&lt;/p&gt;</content><author><name>Code S</name></author><category term="FTZ" /><category term="FTZ" /><category term="HackerSchool" /><summary type="html">안녕하세요! 🙋‍♂️ Code S 입니다! 재미있게 읽어주세용! 해커스쿨: HackerSchool.org</summary></entry></feed>