일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- #CallByAddress
- hyperledger transaction
- #C++ 연산자함수오버로딩
- html multimedia
- #다차원포인터
- 하이퍼레저패브릭
- #JAVASCRIPT
- html code
- docker example
- #bubbleSort
- #성적관리프로그램
- #android activity
- #C++ has~a
- html plug-in
- html charset
- #3차원배열
- html id
- #binary
- #자바상속#자바이즈어#is~a
- html youtube
- relative path
- 토큰경제
- html5 new tag
- html video
- git flow
- mac terminal command
- html object
- #1차원배열
- border-box
- #2차원배열
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 |