Function2Presented by Junyoung Jung
Club MARO
Dept. of Electronic and Radio Engineering
Kyung Hee Univ.
ch6.
Content
1.
Recursion Function
2.
Call by Value
3.
Call by Reference
4.
Practice
5.
Assignments
0.
Last class Review
Content
3
0.
Last classReview
4.
Practice
5.
Assignments
1.
RecursiveFunction
2.
Call by Value
3.
Call by Reference
Content
4
0.
Last classReview
4.
Practice
5.
Assignments
1.
RecursiveFunction
2.
Call by Value
3.
Call by Reference
# 재귀함수
함수가 자기 자신을 호출하는 것을
재귀 함수라 한다.
반복문으로 충분히 나타낼 수 있지만,
재귀함수를 사용하는 것은
직관적으로 알기 쉬워서이다!!
Content
5
0.
Last classReview
4.
Practice
5.
Assignments
1.
RecursiveFunction
2.
Call by Value
3.
Call by Reference
# 재귀함수
저번주 과제 재귀써서
푼 칭구들 있던데,
재귀를 안 쓴 사람 & 과제를 안 한사람은
지금 한번 해보기!!!
Content
6
0.
Last classReview
4.
Practice
5.
Assignments
1.
RecursiveFunction
2.
Call by Value
3.
Call by Reference
# Call by Value (값에 의한 호출)
…
void func1(int a, int b) {
int temp = a;
a = b;
b= temp;
return ;
}
int main() {
int num1 = 10;
int num2 = 20;
cout << “befor : ” << num1 << “, ” << num2 << endl;
func1(num1, num2);
cout << “after: ” << num1 << “, ” << num2 << endl;
return 0;
}
Content
7
0.
Last classReview
4.
Practice
5.
Assignments
1.
RecursiveFunction
2.
Call by Value
3.
Call by Reference
…
void func2(int *a, int *b) {
int temp = *a;
*a = *b;
*b= temp;
return ;
}
int main() {
int num1 = 10;
int num2 = 20;
cout << “befor : ” << num1 << “, ” << num2 << endl;
func2(&num1, &num2);
cout << “after: ” << num1 << “, ” << num2 << endl;
return 0;
}
# Call by Reference (참조에 의한 호출)
Content
8
0.
Last classReview
4.
Practice
5.
Assignments
1.
RecursiveFunction
2.
Call by Value
3.
Call by Reference
func1 vs func2
차이점을 알겠나?
Content
9
0.
Last classReview
4.
Practice
5.
Assignments
1.
RecursiveFunction
2.
Call by Value
3.
Call by Reference
무엇을
참조(?)?????
Ch02에서 배운
컴퓨터 구조 를 생각해보자!!!
Content
10
0.
Last classReview
4.
Practice
5.
Assignments
1.
RecursiveFunction
2.
Call by Value
3.
Call by Reference
CPU Memory
I/O I/O
. . .
0
4
8
100
104
108
Processing
Content
11
0.
Last classReview
4.
Practice
5.
Assignments
1.
RecursiveFunction
2.
Call by Value
3.
Call by Reference
*
&
: 메모리 주소를 가리킨다
: 메모리 주소를 받는다
# 이것만은 꼭 이해 !!!
Content
12
0.
Last classReview
4.
Practice
5.
Assignments
1.
RecursiveFunction
2.
Call by Value
3.
Call by Reference
…
void func1(int *a, int *b) { }
int main() {
…
func1(&num1, &num2);
return 0;
}
. . .
num1
num2
func2( *a , *b )
100번지
101번지
# 이것만은 꼭 이해 !!!
Content
13
0.
Last classReview
4.
Practice
5.
Assignments
1.
RecursiveFunction
2.
Call by Value
3.
Call by Reference
위에 예제 코드 보지 말고
직접 코딩해보기
func1: call by value 이용 swap
func2: call by reference 이용 swap
# Practice
Content
14
0.
Last classReview
2.
Call by Value
3.
Call by Reference
4.
Practice
5.
Assignments
1.
RecursiveFunction
Assignment )
재귀를 써서
Factorial 함수 만들기
Content
15
0.
Last classReview
2.
Call by Value
3.
Call by Reference
4.
Practice
5.
Assignments
1.
RecursiveFunction
Assignment 뽀너스)
D-Day 계산하는 함수
만들기!!!!!!!!!!!!
(참고로 내가 1학년때 이거하느라 개고생)
(시간 남는 사람만 해봐 ㅋㅋㅋㅋㅋㅋ)
Thank you

More Related Content

PDF
JDD2015: Frege - how to program with pure functions - Dierk König
PDF
Iteration, induction, and recursion
PDF
21 multi threading - iii
PPTX
Jsp session 12
PPTX
Python Closures Explained | What are Closures in Python | Python Closures
PPTX
Virtual function complete By Abdul Wahab (moon sheikh)
PPTX
polymorphism and virtual function
PDF
Defer, Panic, Recover
JDD2015: Frege - how to program with pure functions - Dierk König
Iteration, induction, and recursion
21 multi threading - iii
Jsp session 12
Python Closures Explained | What are Closures in Python | Python Closures
Virtual function complete By Abdul Wahab (moon sheikh)
polymorphism and virtual function
Defer, Panic, Recover

Similar to [C++]6 function2 (16)

PDF
6. function
PPTX
chapter-6 slide.pptx
PPTX
practices of C programming function concepts
PPTX
UNIT3.pptx
PPTX
Function basics
PPTX
Part 3-functions1-120315220356-phpapp01
PPTX
Safe int
PPT
Unit iii mca 1st year
PDF
[C++]3 loop statement
PPT
Functions and pointers_unit_4
PDF
interface
PPT
Fucntions & Pointers in C
PPSX
C programming function
PPTX
Function (rule in programming)
PDF
C_Dayyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy 3.pdf
PPTX
Pointers in c++ programming presentation
6. function
chapter-6 slide.pptx
practices of C programming function concepts
UNIT3.pptx
Function basics
Part 3-functions1-120315220356-phpapp01
Safe int
Unit iii mca 1st year
[C++]3 loop statement
Functions and pointers_unit_4
interface
Fucntions & Pointers in C
C programming function
Function (rule in programming)
C_Dayyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy 3.pdf
Pointers in c++ programming presentation
Ad

More from Junyoung Jung (20)

PDF
[KCC oral] 정준영
PDF
전자석을 이용한 타자 연습기
PDF
[2018 평창올림픽 기념 SW 공모전] Nolza 보고서
PDF
[2018 평창올림픽 기념 SW 공모전] Nolza - Activity curation service
PDF
SCC (Security Control Center)
PDF
Google File System
PDF
sauber92's Potfolio (ver.2012~2017)
PDF
Electron을 사용해서 Arduino 제어하기
PDF
[UNITHON 5TH] KOK - 프로귀찮러를 위한 지출관리 서비스
PDF
[우아주, Etc] 정준영 - 페이시스템
PDF
[우아주, 7월] 정준영
PDF
[team608] 전자석을 이용한 타자연습기
PDF
[Kcc poster] 정준영
PDF
[Graduation Project] 전자석을 이용한 타자 연습기
PDF
[KCC poster]정준영
PDF
16 학술제 마무리 자료
PDF
[Maybee] inSpot
PDF
[대학생 연합 해커톤 UNITHON 3RD] Mingginyu_ppt
PDF
[2016 K-global 스마트디바이스톤] inSpot
PDF
[2015전자과공모전] ppt
[KCC oral] 정준영
전자석을 이용한 타자 연습기
[2018 평창올림픽 기념 SW 공모전] Nolza 보고서
[2018 평창올림픽 기념 SW 공모전] Nolza - Activity curation service
SCC (Security Control Center)
Google File System
sauber92's Potfolio (ver.2012~2017)
Electron을 사용해서 Arduino 제어하기
[UNITHON 5TH] KOK - 프로귀찮러를 위한 지출관리 서비스
[우아주, Etc] 정준영 - 페이시스템
[우아주, 7월] 정준영
[team608] 전자석을 이용한 타자연습기
[Kcc poster] 정준영
[Graduation Project] 전자석을 이용한 타자 연습기
[KCC poster]정준영
16 학술제 마무리 자료
[Maybee] inSpot
[대학생 연합 해커톤 UNITHON 3RD] Mingginyu_ppt
[2016 K-global 스마트디바이스톤] inSpot
[2015전자과공모전] ppt
Ad

Recently uploaded (20)

PPTX
Python is a high-level, interpreted programming language
PPTX
CNN LeNet5 Architecture: Neural Networks
PDF
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
PPTX
Airline CRS | Airline CRS Systems | CRS System
PPTX
Trending Python Topics for Data Visualization in 2025
PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
DOCX
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
PDF
Microsoft Office 365 Crack Download Free
PDF
iTop VPN Crack Latest Version Full Key 2025
DOC
UTEP毕业证学历认证,宾夕法尼亚克拉里恩大学毕业证未毕业
PDF
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
PPTX
Tech Workshop Escape Room Tech Workshop
PPTX
GSA Content Generator Crack (2025 Latest)
PDF
Guide to Food Delivery App Development.pdf
PPTX
Full-Stack Developer Courses That Actually Land You Jobs
PPTX
Matchmaking for JVMs: How to Pick the Perfect GC Partner
PDF
E-Commerce Website Development Companyin india
PPTX
Download Adobe Photoshop Crack 2025 Free
PDF
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
Python is a high-level, interpreted programming language
CNN LeNet5 Architecture: Neural Networks
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
Airline CRS | Airline CRS Systems | CRS System
Trending Python Topics for Data Visualization in 2025
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
Microsoft Office 365 Crack Download Free
iTop VPN Crack Latest Version Full Key 2025
UTEP毕业证学历认证,宾夕法尼亚克拉里恩大学毕业证未毕业
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
Tech Workshop Escape Room Tech Workshop
GSA Content Generator Crack (2025 Latest)
Guide to Food Delivery App Development.pdf
Full-Stack Developer Courses That Actually Land You Jobs
Matchmaking for JVMs: How to Pick the Perfect GC Partner
E-Commerce Website Development Companyin india
Download Adobe Photoshop Crack 2025 Free
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025

[C++]6 function2