| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- border-box
- html video
- #CallByAddress
- #android activity
- git flow
- #자바상속#자바이즈어#is~a
- #C++ 연산자함수오버로딩
- html5 new tag
- relative path
- html charset
- #JAVASCRIPT
- html object
- #3차원배열
- #bubbleSort
- html id
- #1차원배열
- mac terminal command
- #다차원포인터
- hyperledger transaction
- docker example
- #C++ has~a
- html youtube
- #2차원배열
- html multimedia
- #binary
- 토큰경제
- html code
- 하이퍼레저패브릭
- html plug-in
- #성적관리프로그램
Archives
- Today
- Total
A sentimental robot
int * const p 본문
#include<stdio.h>
#pragma warning (disable:4996)
void main()
{
int a = 10;
int b = 20;
int *const p=&b; // 상수 포인터 ( 고정포인터 ) > 주소를 바꿀수 없다. > 선언과 동시에 초기화를 해야함★
b = 500;
printf("%d %d %d\n",a, b,*p); //10 500 500
*p=300; //b=300 값을 바꾸는 것은 가능하다.
printf("%d %d %d\n",a, b,*p);
p = &a; // error : 고정된 주소포인터이기 때문에 주소를 바꿀 수 없다!!★
}
'C ' 카테고리의 다른 글
| 파일 입출력 (0) | 2018.01.02 |
|---|---|
| const int *const p (0) | 2018.01.02 |
| const int *p (0) | 2018.01.02 |
| const (0) | 2018.01.02 |
| 구조체의 포인터멤버변수 동적메모리할당 (0) | 2018.01.02 |