#include <stdio.h>
int main() {
char array[10]={'a', 'l', 'g', 'o'};
//%s로 문자열로 출력하기
printf("%s\n", array);
//%c로 한 단어씩 출력하기
for(int i=0;i<sizeof(array);i++){
printf("%c\n", array[i]);
}
//아스키코드로 출력하기
for(int i=0;i<sizeof(array);i++){
printf("%d\n", array[i]);
}
//문자열 입력 받기
char name[32];
scanf("%s", name);
printf("%s\n", name);
//아스키코드 출력하기
printf("%c\t", 'A');
printf("%d\n", 'A');
}
To embed this project on your website, copy the following code and paste it into your website's HTML: