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 @@
*/*
Computer-Programming-and-Practice-2025-1.vcxproj.user
4 changes: 4 additions & 0 deletions Project-Function-Calls-No-Parameter.vcxproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
51 changes: 51 additions & 0 deletions Project-Function-Declarations-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>ProjectFunctionDeclarationsNoParameter</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-Declarations-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="c 소스 파일">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>c</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.c">
<Filter>c 소스 파일</Filter>
</ClCompile>
</ItemGroup>
</Project>
4 changes: 4 additions & 0 deletions Project-Function-Declarations-No-Parameter.vcxproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
# Computer Programming and Practice 2025-1
컴퓨터 프로그래밍 및 실습 과목의 수업 홈페이지
# 함수선언 (매개변수가 없을 때)

함수 선언은 함수 정의, 전역변수 선언과 더불어 전처리 후의 C 프로그램을 구성합니다.
함수 선언은 이름이 특정 반환타입의 함수를 가리킨다고 정합니다.

`타입` `이름` `(` `)` `;` 형태로 씁니다.

#### 코드 예시:
```c
/* 반환 타입이 void고, 이름이 x인 함수의 선언 */
void x();
```

#### 관련 C89 표준
3.5.4.3 Function declarators (including prototypes)
> Semantics
>
> If, in the declaration "T D1", D1 has the form
>
> D( ... )
>
> ... then the type specified for ident is " ... function returning T."
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 d17.13
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Project-Function-Declarations-No-Parameter", "Project-Function-Declarations-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
23 changes: 23 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* 매개변수가 없는 함수의 선언 */

/* 문법
* 매개변수가 없는 함수는 타입 이름 ( ) ; 형식으로 선언합니다.
*
* 의미
* 해당 이름이 특정 반환타입의 함수를 뜻한다고 정합니다.
*/

/* To Do: 반환 타입이 int이고 이름이 five인 함수를 선언해보세요 */

int main() {
return five();
}

/*
* 함수 이름: five
* 반환 타입: int
* five()는 5를 결과값으로 반환한다.
*/
int five() {
return 5;
}