반응형 Pointer1 6. Pointer[C Basic] 6.1. Write program using pointer The function should receive three integer pointer: 1. Increase 1st argument by 1 2. Multiply 2nd argument by 3rd argument 3. Assign the result to 2nd argument 4. Swap 2nd and 3rd argument #include cal(int *a, int *b, int *c) { (*a)++; (*b) *= (*c); int temp = *b; *b = *c; *c = temp; } int main() { int a, b, c; printf("Enter three numbers: "); scanf("%d %d %d", &a.. 2021. 11. 7. 이전 1 다음 반응형