C language/Baekjoon

[C] 백준 2557번 풀이: Hello world!

저별이 2021. 7. 3. 00:51
728x90
#include <stdio.h>
int main(void){
    
    printf("Hello World!");
    return 0;
}

백준 사이트의 가장 기초중의 기초

Hello, world!

이 코드가 기반이 되어 많이 쓰이게 된다.

#include <stdio.h>는 c언어의 거의 필수 요소이고

int main(void){ }는 없어서는 안되는 존재.

printf는 c언어에서 출력할 때 쓰는 것이고 return을 해주면서 종료의 역할을 한다.

그리고 ""은 문자열이므로 쓰는 것이다.

중괄호로 main이 가지게 해주는 것은 필수

https://www.acmicpc.net/problem/2557

728x90