티스토리 뷰
Call by reference & Call by value with example code
Call By Value
If you change the value of the parameter. It modifies the value in the current function only.
It doesn't affect the value of the variable in the caller.
Call By Reference
It modifies the value of inside the function as well as outside because a reference (address) is passed.
Example code
Output
'C++' 카테고리의 다른 글
Class and Object in C++ (0) | 2018.11.06 |
---|---|
Dynamic Allocation in C++ (0) | 2018.11.03 |
Function Overloading in C++ with example code (0) | 2018.11.03 |
Array and Pointer example (0) | 2018.10.31 |
Double pointer(pointer to pointer) basic example code (0) | 2018.10.31 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- Javascript Algorithm
- equals()
- 알고리즘
- compareTo()
- javascript
- hackerrank javascript
- C++
- math.abs
- string class in java
- 프로그래머스 알고리즘문제
- hackerrank solution
- ... in Javascript
- HashMap
- code refactoring
- easy javascript algorithm
- algorithm
- 프로그래머스
- repeat()
- Object type casting
- HackerRank Algorithm
- rest parameter
- hackerrank
- Collection Framework
- substring()
- hackerrank javascript solution
- java
- 프로그래머스 알고리즘
- math.max
- easy algorithm
- spring boot application
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함