Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
battle_c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LEESANGKYEONG
battle_c
Commits
6c0835a1
Commit
6c0835a1
authored
4 years ago
by
LEESANGKYEONG
Browse files
Options
Downloads
Patches
Plain Diff
update
parent
650cb29e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
HW5_Pointer/README.md
+5
-3
5 additions, 3 deletions
HW5_Pointer/README.md
with
5 additions
and
3 deletions
HW5_Pointer/README.md
+
5
−
3
View file @
6c0835a1
...
...
@@ -7,17 +7,17 @@
-
포인터는 특정 변수 자체가 존재하는 메모리 주소의 값을 가진다.
<그림
1
>

다음 사진처럼 a를 이용해서 5를 찾을 수 있고 포인터 변수 b를 이용해서 5를 찾을 수 있다.
-
다음 사진처럼 a를 이용해서 5를 찾을 수 있고 포인터 변수 b를 이용해서 5를 찾을 수 있다.
<그림
2
>

int a = 5; 라고 변수를 할당하면 메모리 주소상에서
<그림
2
>
처럼 기록된다.
-
int a = 5; 라고 변수를 할당하면 메모리 주소상에서
<그림
2
>
처럼 기록된다.
-
int - 4byte
-
long long - 8byte
-
void - 1byte
## 포인터 주의사항
<그림
3
>

위와 같은 코드는 부적절하다.
-
위와 같은 코드는 부적절하다.
-
포인터는 컴퓨터 시스템의 특정 메모리에 바로 접근할 수 있기 때문에 기존에 존재하던 중요한 메모리 영역에 접근하지 않도록 한다.
## 포인터 관련 연산자
...
...
@@ -31,6 +31,8 @@ int a = 5; 라고 변수를 할당하면 메모리 주소상에서 <그림 2>처
-
선언된 포인터 변수가 가리키는 변수를 구한다.
## 포인터 배열
-
예시코드 test4.c
```
C code
#include <stdio.h>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment