다음 C 프로그램의 실행 결과로 옳은 것은?
#include <stdio.h>
int main() {
int a;
double c, d;
c = a = 3.5;
d = 3+a/2+c;
printf("Result = %3.1f\n", d);
return 0;
}- ①Result = 6.5
- ②Result = 7.0
- ③Result = 7.5
- ④Result = 8.0
선지를 골라 바로 채점해 보세요.
정답 ②
출처: 인사혁신처 공개 기출(공공데이터포털, 이용허락 제한 없음)