정보처리기사 2022년 1회 62번: 두 판 사이의 차이
IT위키
Maintenance script (토론 | 기여) (Imported from text file) |
(차이 없음)
|
2022년 10월 22일 (토) 01:01 기준 최신판
과목: 프로그래밍 언어 활용
문제[편집 | 원본 편집]
62. 다음 C언어 프로그램이 실행되었을 때, 실행 결과는?
<br />#include<stdio.h><br />#include<stdlib.h><br />int main(int argc, char *argv[]) {<br /> int arr[2][3]={1,2,3,4,5,6};<br /> int (*p)[3]=NULL;<br /> p=arr;<br /> printf("%d, ", *(p[0]+1)+*(p[1]+2));<br /> printf("%d", *(*(p+1)+0)+*(*(p+1)+1));<br /> return 0;<br />}<br />
- ① 7, 5
- ② 8, 5
- ③ 8, 9
- ④ 7, 9
풀어보기[편집 | 원본 편집]
정답[편집 | 원본 편집]
- 3번