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