[C언어] 너무 사소해서 올리기 민망한 내용
2021.04.13
#include <stdio.h>
int main(void)
{
int i = 0;
for (i = 0, printf("hello "); i < 5; ++i)
{
printf("%d ", i);
}
return 0;
}
output: hello 0 1 2 3 4
Reference: https://www.inflearn.com/course/following-c/dashboard
21/04/14 추가
#include <stdio.h>
int main()
{
int arr[4] = {1, 2, 3, 4, [1] = 4};
int i;
for (i = 0; i < 4; ++i)
{
printf("%d ", arr[i]);
}
}
output: 1 4 3 4
<designated initializer> 로 arr[1]의 값이 4로 덮어씌어졌다.
자바 실험 결과