-
[c++] The pointer that points to the whole array아무거나적어~ 2023. 1. 10. 16:24
Pointer to an Array | Array Pointer - GeeksforGeeks
A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
www.geeksforgeeks.org
1234567891011121314151617#include <iostream>using namespace std;int main(){int arr[5]{};int* p = arr; // Pointer to 0th element of the arrayint (*ptr)[5] = &arr; // Pointer to the whole array arrcout << p << ' ' << ptr << endl;p++; ptr++;cout << p << ' ' << ptr << endl;return 0;}cs'아무거나적어~' 카테고리의 다른 글
파이썬이 콘솔 default setting (0) 2023.01.11 [c++] c++ cstype string (0) 2023.01.10 next_permutation implementation (0) 2023.01.08 pycharm file size 뭐시기 (0) 2023.01.07 python heap은 [0]로 최소원소 가져올 수 있음 (0) 2023.01.07