5
C에서 * ptr + = 1과 * ptr ++의 차이점
방금 C를 공부하기 시작했고 포인터를 함수의 매개 변수로 포인터에 전달하는 예제를 수행 할 때 문제를 발견했습니다. 이것은 내 샘플 코드입니다. #include <stdio.h> #include <string.h> #include <stdlib.h> int* allocateIntArray(int* ptr, int size){ if (ptr != NULL){ for (int i = 0; i < size; i++){ ptr[i] = i; } } return …
122
c
pointers
post-increment