목차
차원 배열
배열의 초기화
첨자
포인터
포인터 변수
역참조 연산자 *
포인터 예제
참조에 의한 호출
배열과 포인터의 관계
calloc()과 malloc()....
본문내용
1 차원 배열
배열 : 첨자가 붙은 변수를 사용하고 여러 개의 동질적 값을
표현할 수 있는 자료형
예 (성적처리를 위한 변수 선언)
int grade0, grade1, grade2;
int grade[3];
1차원 배열 선언
int a[size]; /* space for a[0], ..., a[size - 1] allocated */
lower bound = 0
upper bound = size - 1
size = upper bound + 1
사용 예
#define N 100
int a[N]; /* space for a[0], ..., a[99] is allocated */
for (i = 0; i < N; ++i)
sum += a[i]; /* process element a[i] */
참고 자료
없음