문자열 선언 (1) 썸네일형 리스트형 열혈 ( C ) chapter 21 정리노트 2 chapter21-3 문자열 출력 함수: puts, fputs #include int puts(const char * s); int fputs(const char*s,FILE * stream); puts 함수는 출력의 대상이 stdout으로 결정되어 있지만, fputs 함수는 두 번째 인자를 통해서 출력의 대상을 결정할 수 있다. 그리고 둘 다 첫 번째 인자로 전달되는 주소 값의 문자열을 출력을 한다. #include int main(void) { char* str = "Simple String"; printf("1.puts Test ------\n"); puts(str); puts("So simple String"); printf("2.fputs Test ------\n"); fputs(str, std.. 이전 1 다음