int iArr[10] = {};
int* pInt = iArr;
*pInt = 100;
int iArr[10] = {};
int* pInt = iArr;
*(pInt + 4) = 100;
int iArr[10] = {};
int* pInt = iArr;
*(pInt + 1) = 100;
long long iArr[10] = {};
long long* pInt = iArr;
long long* pInt2 = iArr + 1;
*pInt = 100;
*(pInt + 1) = 400;
*(pInt + 2) = 200;
int iArr[10] = {0, 1, 2, 3, 4 };
int* pInt = iArr;
*pInt = 1;
pInt += 1;
*(pInt + 0) = 1;
*(pInt + 1) = 2;
*(pInt + 2) = 3; // int 주소에 받아와서 8바이트 증가시킨 주소값에 3을 대입해라.
*(pInt + 3) = 4;
int iArr[0] = 1;
int iArr[1] = 2;
int iArr[2] = 3;
int iArr[3] = 4;
struct mystruct
{
int a;
short s;
};
int main()
{
int num = 0;
mystruct st = {};
pVoid = &st;
pVoid = #
pVoid + 1;
*pVoid;
}
#include <iostream>
struct mystruct
{
int a;
short s;
};
int main()
{
int num = 0;
int* pNum = #
*pNum = 100;
float* pFloat = (float*)#
int data = *pFloat;
mystruct* pMySt = nullptr;
mystruct st = {};
pMySt = &st;
(*pMySt).a;
(*pMySt).s;
pMySt->a;
pMySt->s;
void* pVoid = nullptr;
pVoid = &st;
pVoid = #
//pVoid + 1;
//*pVoid;
// 주소 연산
{
int iArr[10] = {};
iArr[2] = 10;
int* pInt = iArr;
*(pInt + 0) = 1;
*(pInt + 1) = 2;
*(pInt + 2) = 3;
*(pInt + 3) = 4; // pInt[3] = 4;
pInt[0] = 1;
}
return 0;
}
1차 23.12.14
2차 23.12.15
3차 23.12.17
4차 23.12.18
5차 23.12.19
6차 23.12.25
7차 24.01.01
8차 24.01.23