Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[*.c]
charset = utf-8
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!main.c
51 changes: 51 additions & 0 deletions Project-Function-Calls-No-Parameter.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{56298b6a-7bcc-4ad5-857c-3ae51b8ca9fa}</ProjectGuid>
<RootNamespace>ProjectFunctionCallsNoParameter</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="main.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
14 changes: 14 additions & 0 deletions Project-Function-Calls-No-Parameter.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="소스 파일">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>c</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.c">
<Filter>소스 파일</Filter>
</ClCompile>
</ItemGroup>
</Project>
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,26 @@
# Computer Programming and Practice 2025-1
컴퓨터 프로그래밍 및 실습 과목의 수업 홈페이지
# 함수호출식 (매개변수가 없는 함수)

함수를 실행하는 것을 함수를 호출한다고 합니다.
함수를 호출하는 것은 값을 쓰거나 더하기를 하는 것처럼 결과로 값을 얻습니다.
실행 결과를 얻는 것을 식이라고 하고, 식은 문장의 일부로 쓰입니다.

`식` `(` `)` 형태로 씁니다.

`(` 왼쪽의 `식`은 함수를 가리켜야 합니다.

#### 코드 예시:
```c
int main() {
return main(); /* 자신을 무한히 호출해서 에러가 발생합니다 */
}
```

#### 관련 C89 표준
3.3.2.2 Function calls
> Semantics
>
> ... expression followed by parentheses () ... is a function call.
>
> ... expression denotes the called function. ...
>
> ... Recursive function calls shall be permitted, both directly and indirectly through any chain of other functions.
22 changes: 22 additions & 0 deletions Solution-Week2.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.13.35818.85
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Project-Function-Calls-No-Parameter", "Project-Function-Calls-No-Parameter.vcxproj", "{56298B6A-7BCC-4AD5-857C-3AE51B8CA9FA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{56298B6A-7BCC-4AD5-857C-3AE51B8CA9FA}.Debug|x64.ActiveCfg = Debug|x64
{56298B6A-7BCC-4AD5-857C-3AE51B8CA9FA}.Debug|x64.Build.0 = Debug|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7548D284-3031-4A53-8359-876BE48586E0}
EndGlobalSection
EndGlobal
20 changes: 20 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* 매개변수가 없는 함수의 호출식 */

/* 문법
* 식 ( ) 형태로 함수호출식을 씁니다.
* 여기서의 식은 함수를 가리켜야 합니다. 함수 이름 등이 가능합니다.
*
* 의미
* 함수를 실행합니다.
* 함수에서 반환한 값이 식의 결과값이 됩니다.
*/

/* five는 int 타입의 값인 5를 반환하는 함수입니다. */
int five() {
return 5;
}

int main() {
/* To Do: five()를 호출한 결과를 반환해보세요 */
return five();
}