Skip to content

Commit a716af5

Browse files
committed
240531 정보처리기사 실기 - C언어 (2021-3회 17번)
1 parent ef2d9cf commit a716af5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

EIP/C/README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199

200200
- [] 37
201201

202-
- 문제7. 다음 C언어로 구현된 프로그램을 분석하여 그 실행 결과를 쓰시오. (단, 출력문의 출력 서식을 준수하시오)
202+
- 문제17. 다음 C언어로 구현된 프로그램을 분석하여 그 실행 결과를 쓰시오. (단, 출력문의 출력 서식을 준수하시오)
203203

204204
```c
205205
#include <stdio.h>
@@ -216,14 +216,15 @@
216216
struct jsu* p;
217217
p = &st[0];
218218

219-
printf("%d\n", (p+1)->hab = (p+1)->os + (p+2)->db); // 159
220-
printf("%d\n", (p+1)->hhab = (p+1)->hab + p->os + p->db); // 342
219+
(p+1)->hab = (p+1)->os + (p+2)->db; // 159
220+
(p+1)->hhab = (p+1)->hab + p->os + p->db; // 342
221+
221222
printf("%d\n", (p+1)->hab + (p+1)->hhab); // 501 (최종 정답, 159+342)
222223

223224
return 0;
224225
}
225226
```
226-
227+
227228
- 답 : 501 (159+342=501 이므로)
228229
229230

0 commit comments

Comments
 (0)