#include <stdio.h>
int main() {
int array[6]; //배열 선언
array[0] = 10;
printf("%d\n", array[0]);
int array2[6] = {10, 2, 0, 0, 0, 1}; //초기화
for(int i=0;i<6;i++){
printf("%d\n", array2[i]);
}
float array_f[5] = {1.2, 3.4, 0, 0, 0};
for(int i=0;i<5;i++){
printf("%.1f\n", array_f[i]);
}
char array_c[10] = "algoaca";
printf("%s\n", array_c);
for(int i=0; i<10; i++){
printf("%c\n", array_c[i]);
}
int array3[] = {1, 2};
}
To embed this project on your website, copy the following code and paste it into your website's HTML: