목록C (1)
나의 블로그
[C] puts 함수
문자열을 출력할 때 사용하는 함수문자열 뒤에 자동으로 줄바꿈 문자(\n)를 추가 (printf와의 주요 차이점)문자열만 출력할 수 있으며, 다른 자료형(예: 정수, 실수 등)을 출력할 수 없음사용법 :puts(문자 배열); 예시 :#include int main() { puts("The Best of QUEEN"); printf("Killer Queen\n"); printf("Bohemian Rhapsody\n"); return 0;} 위 코드의 출력 :The Best of QUEENKiller QueenBohemian Rhapsody
C
2024. 9. 9. 23:22