[๋๊ตฌ๋ ์ฝ๊ฒ ์ฆ๊ธฐ๋ C ์ธ์ด ์ฝ์ํธ - ๊ฐ์ 3ํ] 9์ฅ Programming ํ์ด
# 9์ฅ Programming ํ์ด 370p_1๋ฒ) #include int get_array_sum(int* A, int size) { int sum = 0; for (int i = 0; i < size; i++) { sum += A[i]; } return sum; } int main() { int data[10] = { 1,2,3,4,5,6,7,8,9 }; int *p; p = data; printf("print_array()\n"); for (int k = 0; k < 10; k++) { printf("%d ", data[k]); } printf("\n๋ฐฐ์ด ์์์ ํฉ: %d\n", get_array_sum(data, 10)); return 0; } 370p_2๋ฒ) #include void invers..
2023. 1. 22.
[๋๊ตฌ๋ ์ฝ๊ฒ ์ฆ๊ธฐ๋ C ์ธ์ด ์ฝ์ํธ - ๊ฐ์ 3ํ] 9์ฅ Mini Project ๋ฌธ์ ํ์ด
# 9์ฅ Mini Project ๋ฌธ์ ํ์ด 367p_Mini Project_Pointer ์ฌ์ฉ X) #include #include char getinputt; int main() { char origin_map[10][10] = { {'0', '0', '0', '0', '0', '0', '0', '0', '0', '0'}, {'0', '0', '0', '0', '0', '0', '0', '0', '0', '0'}, {'0', '0', '0', '0', '0', '0', '0', '0', '0', '0'}, {'0', '0', '0', '0', '0', '0', '0', '0', '0', '0'}, {'0', '0', '0', '0', '0', '0', '0', '0', '0', '0'}, {'0', '..
2023. 1. 21.