필기4지선다보통 · 20점
5394.
다음 C 프로그램을 실행했을 때 출력 결과는?
1#include <stdio.h>23struct rec {4int total;5int v[8];6};78int main(void) {9int i;10struct rec p, q;11p.total = 0;12q.total = 0;13for (i = 0; i < 8; i++) {14p.v[i] = i;15q.v[i] = p.v[i] + i;16}17for (i = 1; i < 8; i = i + 2) {18p.total = p.total + p.v[i];19q.total = q.total + q.v[i];20}21printf("%d", p.total + q.total);22return 0;23}
필기 3과목 · 프로그래밍 언어 활용★★★ 4회 출제 · 최근 2026년 2회