Microsoft PowerPoint - 11_C_Language_C_Standard_Library

Similar documents
chap7.key

Microsoft PowerPoint - chap13-입출력라이브러리.pptx

Microsoft PowerPoint - 06_(C_Programming)_(Korean)_Characters_Strings

untitled

PowerPoint 프레젠테이션

11장 포인터

13 주차문자열의표현과입출력

歯9장.PDF

Microsoft PowerPoint - 제11강 파일 처리

PowerPoint 프레젠테이션

PowerPoint Template

<4D F736F F F696E74202D20B8AEB4AABDBA20BFC0B7F920C3B3B8AEC7CFB1E22E BC8A3C8AF20B8F0B5E55D>

Microsoft PowerPoint - 09_(C_Programming)_(Korean)_File_Processing

금오공대 컴퓨터공학전공 강의자료

Computer Programming (2008 Fall)

슬라이드 1

C Programming

제1장 Unix란 무엇인가?

Microsoft PowerPoint - chap10-함수의활용.pptx

Microsoft PowerPoint - chap4 [호환 모드]

Microsoft PowerPoint - 12_(C_Programming)_(Korean)_Appendix-B_C_Standard_Library

슬라이드 1

11장 포인터

Microsoft PowerPoint - chap11.ppt [호환 모드]

Microsoft PowerPoint - chap02-C프로그램시작하기.pptx

11장 포인터

윤성우의 열혈 TCP/IP 소켓 프로그래밊

Microsoft PowerPoint - chap-12.pptx

<4D F736F F F696E74202D D20B9AEC0DABFAD2C20BDBAC6AEB8B2B0FA20C6C4C0CF20C0D4C3E2B7C2>

이번장에서학습할내용 문자표현방법 문자열표현방법 문자열이란무엇인가? 문자열의입출력 문자처리라이브러리함수 표준입출력라이브러리함수 인간은문자를사용하여정보를표현하므로문자열은프로그램에서중요한위치를차지하고있다. 이번장에서는 C 에서의문자열처리방법에대하여자세히살펴볼것입니다. 2

Microsoft PowerPoint - Chapter8.pptx

PowerPoint 프레젠테이션

Microsoft PowerPoint - Lesson13.pptx

Microsoft PowerPoint - C프로그래밍-chap15.ppt [호환 모드]

Microsoft PowerPoint - Chap14_FileAccess.pptx

Microsoft PowerPoint - 제9강 문자열

Microsoft PowerPoint - 10_C_Language_Text_Files

Microsoft PowerPoint - 10장 문자열 pptx

<4D F736F F F696E74202D2034C5D8BDBAC6AEC6C4C0CFC0D4C3E2B7C2312E505054>

Microsoft PowerPoint - chap11-1.ppt [호환 모드]

PowerPoint 프레젠테이션

Microsoft PowerPoint - chap08.ppt

11장 포인터

PA for SWE2007

YRRZBRRLMCEQ.hwp

본 강의에 들어가기 전

Algorithms

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C D616E2E637070>


Microsoft PowerPoint - chap11-포인터의활용.pptx

Microsoft PowerPoint - [CPI16] Lecture 10 - 문자열.pptx


PA for SWE2007

C++ Programming

C 프로그램의 기본

금오공대 컴퓨터공학전공 강의자료

Microsoft PowerPoint - 03_(C_Programming)_(Korean)_Pointers

11장 포인터

C 언어 프로그래밊 과제 풀이

이번장에서학습할내용 동적메모리란? malloc() 와 calloc() 연결리스트 파일을이용하면보다많은데이터를유용하고지속적으로사용및관리할수있습니다. 2

11장 포인터

11장 포인터

ch13

설계란 무엇인가?

11장 포인터

OCW_C언어 기초

<4D F736F F F696E74202D20C1A63137C0E520B5BFC0FBB8DEB8F0B8AEBFCD20BFACB0E1B8AEBDBAC6AE>

Microsoft PowerPoint - chap03-변수와데이터형.pptx

<4D F736F F F696E74202D20C1A63132C0E520B9AEC0DABFCD20B9AEC0DABFAD>

제7장 C 표준 파일 입출력

제7장 C 표준 파일 입출력

ABC 11장

PowerPoint Presentation

쉽게 풀어쓴 C 프로그래밍

0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x = (12 + 6) / 2 * 3; x = 27 x = 3 * (8 / 4

쉽게풀어쓴 C 언어 Express 제 12 장문자와문자열 이번장에서학습할내용 문자표현방법 문자열표현방법 문자열이란무엇인가? 문자열의입출력 문자처리라이브러리함수 표준입출력라이브러리함수 인간은문자를사용하여정보를표현하므로문자열은프로그램에서중요한위치를차지하

C 프로그래밊 개요

<4D F736F F F696E74202D20C1A632B0AD20BAAFBCF6BFCD20C0DAB7E12C20C0FCC3B3B8AEBFCD20C0D4C3E2B7C2>

Microsoft PowerPoint - 제12장 문자열(강의)

PA0 for SSE2033

Microsoft PowerPoint - 7_배열_문자열

Microsoft PowerPoint - C_Programming_Basics.ppt [호환 모드]

02장.배열과 클래스

K&R2 Reference Manual 번역본

Microsoft PowerPoint - chap12-고급기능.pptx

설계란 무엇인가?

<4D F736F F F696E74202D D20B9AEC0DABFAD2C20BDBAC6AEB8B2B0FA20C6C4C0CF20C0D4C3E2B7C2>

Standard C Library.hwp

[ 마이크로프로세서 1] 2 주차 3 차시. 포인터와구조체 2 주차 3 차시포인터와구조체 학습목표 1. C 언어에서가장어려운포인터와구조체를설명할수있다. 2. Call By Value 와 Call By Reference 를구분할수있다. 학습내용 1 : 함수 (Functi

본 강의에 들어가기 전

슬라이드 1

Microsoft PowerPoint - chap06-4 [호환 모드]

슬라이드 1

Microsoft PowerPoint APUE(Intro).ppt

Microsoft PowerPoint - chap06-2pointer.ppt

<322EBCF8C8AF28BFACBDC0B9AEC1A6292E687770>

Microsoft PowerPoint - C프로그래밍-chap16.ppt

Microsoft PowerPoint - 08-C-App-19-Quick-Preprocessor

A Dynamic Grid Services Deployment Mechanism for On-Demand Resource Provisioning

Microsoft PowerPoint - [2009] 02.pptx

Transcription:

C Language C 표준라이브러리 Doo-ok Seo clickseo@gmail.com http://

목 차 표준입출력함수 : <stdio.h> 문자열조작함수 : <string.h> 문자관련함수 : <ctype.h> 유틸리티함수 : <stdlib.h> 시간및날짜관련함수 : <time.h> 수학관련함수 : <math.h> 2

표준라이브러리함수 표준라이브러리 C언어와 C++ 언어에는프로그래머의편의성을도모하기위해프로그램언어개발자들에의해작성되어포함된함수들이존재 표준라이브러리함수 표준라이브러리함수를불러들이기위해전처리구문영역에 #include 문 을사용 대표적인표준라이브러리함수인 scanf( ) 와 printf( ) 함수를사용하기위해 <stdio.h> 헤더파일이용 #include <header> 3

표준라이브러리 (cont d) 라이브러리함수와 linker 의관계 4

C 표준라이브러리 표준입출력함수 : <stdio.h> 5

표준입출력함수 : <stdio.h< stdio.h> 입출력함수 stream : 디스크나그외장치를오가는데이터의모임 표준입출력라이브러리는 text stream 또는 binary stream 을처리 text stream : \n 으로끝나는행들의모임 binary stream : 아무런처리를거치지않은데이터들의모임 stream은 open 을통해서파일이나 device 로바꾸어질수있고, close 에의해종료된다. 파일을 open 하면그파일의포인터가리턴된다. 6

표준입출력함수 (cont d) 멤버변수및상수 #include <stdio.h> extern FILE iob[fopen_max] #define stdin (& iob[0]) // 표준입력스트림 #define stdout (& iob[1]) // 표준출력스트림 // 프로그램의오류메시지나다른예외적인내용을출력하기위한출력스트림을가리킨다. #define stderr (& iob[2]) #define BUFSIZ #define NULL #define size_t 7

표준입출력함수 (cont d) 입출력공통함수 #include <stdio.h> // 기존 3 개의매크로를포함해서최소 8 이상이어야한다. // 보통동시에열수있는스트림의개수는운영체제의자원사용상태에따라달라진다. #define FOPEN_MAX #define FILENAME_MAX // 에러발생시오류코드를 errno 에저장하고널포인터를반환 FILE *fopen(const char *filename, const char *mode); // stdin, stdout, stderr 중하나를다른파일과다시연결할때주로사용한다. FILE *freopen(const char *filename, const char *mode, FILE *stream); FILE *fclose(file *stream); // 오류발생시 EOF 를, 그렇지않으면 0 을반환 int fflush(file *stream); // 오류발생시 EOF 를, 그렇지않으면 0 을반환 8

표준입출력함수 (cont d) 서식화된입출력함수 #include <stdio.h> int printf(const char *format,...); int fprintf(file *stream, const char *format,...); // printf() 와동일하지만, 출력이문자열 s 에저장된다. int sprintf(char *s, const char *format,...); 호출성공 : 출력한 bytes 수를반환에러발생 : EOF 를반환 int scanf(const char *format,...); int fscanf(file *stream, const char *format,...); // scanf() 와동일하지만, 입력을문자열 s 에서받아들인다. int sscanf(char *s, const char *format,...); 호출성공 : 입력에성공한필드개수를반환입력된내용을읽던중 EOF 를만나면, EOF 를반환 9

표준입출력함수 (cont d) 문자입출력함수 #include <stdio.h> // stream 의다음문자를부호없는 char 형 (int 형으로된것 ) 을리턴한다. // 오류가발생하거나파일의끝에도달하는경우 EOF 를반환한다. int fgetc(file *stream); // fgetc 와같은동작을하지만... // 다른점은이함수는매크로에서 stream 을여러번읽을때사용가능하다는것이다. int getc(file *stream); int getchar(void); // getc(stdin) 10

표준입출력함수 (cont d) 문자입출력함수 (cont d) #include <stdio.h> // 문자와출력스트림을인자로받아서, // 주어진문자를주어진스트림의현재위치에출력하고출력된문자를 int 타입값으로반환 int fputc(int c, FILE *stream); // fputc 와동일하지만... // 매크로를통해더효율적으로구현된다는점을제외하면 fputc 함수와동일하다. int putc(int c, FILE *stream); int putchar(int c); // putc(c, stdout) // 문자 c 를 unsigned char 타입으로변환해서주어진입력스트림에다시넣어서, // 다음에 fgetc, getc, getchar 함수가호출될때해당문자가반환되도록해준다. // 에러가있으면 EOF 를리턴하고, 없으면되돌려지는문자를리턴한다. int ungetc(int c, FILE *stream); 11

표준입출력함수 (cont d) 문자열입출력함수 입력스트림의한줄 ( 줄넘김문자로구분 ) 을가져와널문자로끝나는문자열로만든다. #include <stdio.h> char *gets (char *strptr); char *fgets (char *strptr, int size, FILE *fp); 호출성공 : strptr 의주소를반환호출실패 : NULL 을반환 메모리에서널문자로끝나는문자열을가져와파일에한줄로쓴다. #include <stdio.h> int puts (const char *strptr); int fputs (const char *strptr, FILE *fp); 호출성공 : 음수가아닌정수를반환호출실패 : EOF 를반환 12

표준입출력함수 (cont d) 파일입출력함수 #include <stdio.h> #define SEEK_SET 0 #define SEEK_CUR 1 #define SEEK_END 2 // fread 와 fwrite 함수는이진파일로의입출력을수행한다. size_t fread(void *ptr, size_t size, size_t nobj, FILE *stream); size_t fwrite(const void *ptr, size_t size, size_t nobj, FILE *stream); int fseek(file *stream, long offset, int origin); long ftell(file *stream); // 현재파일의위치를리턴한다 ( 에러시 -1L 을리턴 ). // rewind(fp) 는 fseek(fp, 0L, SEEK_SET) 과같다. void rewind(file *stream); 13

파일제어함수 표준입출력함수 (cont d) #include <stdio.h> int remove(const char *filename); // 파일을지운다. int rename(const char *oldname, const char *newname); // 파일이름변경호출성공 : 0 을반환에러발생 : 0 이아닌값을반환 14

에러관련함수 표준입출력함수 (cont d) 라이브러리에있는많은함수들은에러가발생했을때에러가발생했음을알려준다. <errno.h> 에는 errno라는변수가선언되어있어서어떤에러가발생했는지를알수있게되어있다. #include <stdio.h> // 해당입력스트림으로부터입력이수행되는과정에서파일의끝에도달했는지를검사한다. // 파일의끝에도달한경우 0 이아닌값을, 도달하지않은경우에는 0 을반환한다. int feof(file *stream); // 스트림의오류상태를반환한다. // 입출력도중오류가발생했다면 0 이아닌값을, 그렇지않다면 0 을반환한다. int ferror(file *stream); // 주어진스트림의오류발생여부나파일끝에도달했는지에대한정보를초기화한다. void clearerr(file *stream); 15

표준입출력함수 (cont d) 에러관련함수 (cont d) #include <stdio.h> // s 와 error 에해당하는에러메시지를출력한다. // 출력형식 : fprintf(stderr, %s : %s n, s, error message ) void perror(const char *s); 16

C 표준라이브러리 문자열조작함수 : <string.h> 17

문자열조작함수 : <string.h< string.h> 문자열조작함수 문자열라이브러리 (<string.h>) 에존재한다. str 이라는접두사로시작한다. NULL : 널포인터상수 size_t : unsigned integer 타입 str (parameters) 문자열길이 : strlen () 문자열의길이를반환 즉널문자를제외한문자열의문자개수를반환한다. #include <string.h> size_t strlen (const char *string); 18

문자열조작함수 (cont d) 문자열복사및비교관련함수 #include <string.h> // 문자열복사관련함수 char *strcpy (char *to_string, const char *from_string); char *strncpy (char *to_string, const char *from_string, size_t size); char *strcat (char *string1, const char *string2); char *strncat (char *string1, const char *string2, size_t size); // 문자열비교관련함수 int strcmp (const char *string1, const char *string2); int strncmp (const char *string1, const char *string2, size_t size); 19

문자열조작함수 (cont d) 문자열복사및비교관련함수 (cont d) #include <string.h> // 문자열내문자위치검색 char *strchr (const char *string, int ch); char *strrchr (const char *string, int ch); // 문자열에있는다른문자열검색 char *strstr (const char *string, const char *sub_string); 20

C 표준라이브러리 문자관련함수 : <ctype.h> 21

문자관련함수 : <ctype.h< ctype.h> 문자분류함수 주어진분류에속하고있는지그렇지않은지를알려준다. 접두어 is 로시작 조건에만족하는경우 0 이아닌값, 만족되지않은경우에는 0 을리턴한다. #include <stdlib.h> int isalnum(c); int isalpha(c); int iscntrl(c); int isdigit(c); int islower(c); int isupper(c); int isspace(c); int ispunct(c); int isxdigit(c); // isalpha(c) 또는 isdigit(c) 가만족되는경우 // isupper(c) 또는 islower(c) 가만족되는경우 // 제어문자인경우 // 십진수 // 영문소문자 // 영문대문자 // 공백, 행바꿈, 리턴 tab, 레이지바꿈등 // 영문자, 숫자공백이아닌문자 // 16 진수 22

문자변환함수 문자관련함수 (cont d) 접두어 to 로시작 변환된문자값인정수를반환 #include <stdlib.h> int tolower(c); int toupper(c); // 문자 c 를소문자로변환 // 문자 c 를대문자로변환 23

프로그램예제 : 문자분류함수 #include <stdio.h> #include <string.h> #include <ctype.h> void main(void) { char *p, msg[] = "Some of THESE letters are Capitals"; puts(msg); 문자관련함수 (cont d) } for(p = msg; p < msg + strlen(msg); p++) { if(islower(*p)) putchar(toupper(*p)); else if(isupper(*p)) putchar(tolower(*p)); else putchar(*p); } printf("\n"); 24

C 표준라이브러리 유틸리티함수 : <stdlib.h> 25

유틸리티함수 : <stdlib.h< stdlib.h> 숫자를문자열로변환하는함수 정수형숫자를 2 진수, 8 진수, 10 진수또는 16 진수의문자열로변환 itoa() 함수 : integer to ascii ltoa() 함수 : long to ascii #include <stdlib.h> // int 형숫자를문자열 s 로변환 char *itoa (int value, char *s, int radix); // long 형숫자를문자열 s 로변환 char *ltoa (long value, char *s, int radix); 26

프로그램예제 : 숫자를문자열로변환 #include <stdio.h> #include <stdlib.h> 유틸리티함수 (cont d) int main() { int num1 = 68734; long int num2 = 9876543; char string[25]; itoa(num1, string, 10); printf(" 정수 : %d, 문자열 : %s \n", num1, string); ltoa(num2, string, 10); printf(" 정수 : %ld, 문자열 : %s \n", num2, string); itoa(num1, string, 2); printf(" 정수 : %d, 2 진수문자열 : %s \n", num1, string); itoa(num1, string, 16); printf(" 정수 : %d, 16 진수문자열 : %s \n", num1, string); return 0; } 27

유틸리티함수 (cont d) 문자열을숫자로변환하는함수 문자열을숫자로 ( 실수형또는정수형 ) 변환 #include <stdlib.h> // 문자열 s 를 double 형실수로변환 double atof (const char *s); // 문자열 s 를 int 형정수로변환 int atoi (const char *s); // 문자열 s 를 long 형정수로변환 long atol (const char *s); 28

프로그램예제 : 문자열을숫자로변환 #include <stdio.h> #include <stdlib.h> 유틸리티함수 (cont d) int main() { char *s1 = "123"; char *s2 = "1234567"; char *s3 = "123.456"; int num1; long int num2; double num3; num1 = atoi(s1); num2 = atol(s2); num3 = atof(s3); printf(" 문자열 : %s, int 형숫자 : %d \n", s1, num1); printf(" 문자열 : %s, int 형숫자 : %d \n", s2, num2); printf(" 문자열 : %s, int 형숫자 : %d \n", s3, num3); return 0; } 29

수학관련함수 유틸리티함수 (cont d) #include <stdlib.h> typedef struct _div_t { int quot, rem; } div_t; typedef sturct _ldiv_t { long quot, rem; } ldiv_t; int abs(int n); // 절대값을리턴한다. long labs(long int n); // long 형변수 n 의절대값을리턴한다. // num/denom 의몫과나머지를계산한다. // 몫은 quot(int) 에나머지는 rem(ldiv_t 형의 structure) 에저장된다. div_t div(int num, int denom); ldiv_t ldiv(long num, long denom); // ldiv_t 와같은데 long 을사용하는것만다름. 30

유틸리티함수 (cont d) 임의의난수생성함수 #include <stdlib.h> #define RAND_MAX... // 최소한 32,767 이상이다. // 0 ~ RAND_MAX 의랜덤수를리턴 int rand (void); // seed 있는랜덤발생함수, 초기의 seed 는 1 이다. void srand (unsigned int seed); 31

프로그램예제 : 3 개의난수생성 #include <stdio.h> #include <stdlib.h> #include <time.h> 유틸리티함수 (cont d) int main(void) { int rand1, rand2, rand3; printf(" 난수를생성하기위한예제프로그램 \n\n "); srand(time(null)); rand1 = rand(); rand2 = rand(); rand3 = rand(); printf("3 개의난수를생성한결과 : rand1 = %d, rand2 = %d, rand3 = %d \n", rand1, rand2, rand3); } return 0; 32

메모리관련함수 유틸리티함수 (cont d) 동적메모리할당및해제함수 #include <stdlib.h> void *malloc (size_t size); // 공간이 0 으로채워지지않는다. void *calloc(size_t nobj, size_t size); // 할당된공간은 0 으로채워진다. void *realloc (void *p, size_t size); void free (void *p); 33

유틸리티함수 (cont d) 프로그램흐름제어관련함수 #include <stdlib.h> #define EXIT_SUCCESS 0 #define EXIT_FAILURE 1 void exit (int status); // 프로그램을정상적인상태로종료시킨다. void abort (void); // 프로그램을그상태에서정지시킨다 ( 비정상적인종료 ). // 프로세스가 exit 를호출하여종료할때수행되는함수들을등록한다. int atexit (void (*fcn)(void); // exit 함수와같지만 clean-up-action 을수행하지않는다. void _exit(int status); // 문자열 s 를 system 으로리턴해준다. int system(const char *s); 34

프로그램예제 : 프로그램흐름제어관련함수 (1/2) #include <stdlib.h> #include <stdio.h> 유틸리티함수 (cont d) void func1(void); void func2(void); int main() { printf("hello\n"); atexit(func1); atexit(func2); printf("bye\n"); } exit(0); // _exit(0); 수정시 func1 과 func2 는실행되지않고종료한다. 35

프로그램예제 : 프로그램흐름제어관련함수 (1/2) void func1(void) { printf("func1\n"); } 유틸리티함수 (cont d) void func2(void) { printf("func2\n"); } 36

C 표준라이브러리 시간및날짜관련함수 : <time.h> 37

시간및날짜관련함수 : <time.h< time.h> 시간및날짜관련함수 #include <time.h> #define CLOCKS_PER_SEC 1000 #define CLK_TCK CLOCKS_PER_SEC typedef long clock_t; typedef long time_t; clock_t clock(void); // clock tick 으로경과된시간 ( 프로세서시간 ) // 1970 년 1 월 1 일자정부터경과된현재시간을초단위로계산 time_t time(time_t *timer); double difftime(time_t time2, time_t time1) // time2 time1 을초로계산한다. 38

시간및날짜관련함수 (cont d) 시간및날짜관련함수 #include <time.h> struct tm { int tm_sec; // 초 [0-59] int tm_min; // 분 [0-59] int tm_hour; // 시 [0-23] int tm_mday; // 일자 [1-31] int tm_mon; // 1 월에서 12 월 [0 11, 0 = January] int tm_year; // 1900 년이후부터경과한년 int tm_wday; // 일요일에서토요일 [0 6, 0 = Sunday] int tm_yday; // 1 월 1 일부터경과된날짜 [0-365] int tm_isdst; // 서머타임설정여부플러그 } 39

시간및날짜관련함수 (cont d) 프로그램예제 : 시간관련함수 #include <stdio.h> #include <time.h> int main() { clock_t start, end; int i = 0; double time; start = clock(); while(i < 30000000) i++; end = clock(); time = (double) (end - start) / CLK_TCK; printf("time : %f\n", time); } return 0; 40

C 표준라이브러리 수학관련함수 : <math.h> 41

수학관련함수 : <math.h< math.h> 수학계산함수 #include <math.h> // 정수형반환 double ceil(double x); double floor(double x); // x 를초과하는정수중에서가장작은정수 // x 보다작은정수중에서가장큰수 // 절대값반환 int abs(int n); long labs(long n); double fabs(double x); // 정수형의절대값을계산 // long 형의절대값을계산 // double 형의절대값을계산 42

수학관련함수 (cont d) 수학계산함수 (cont d) #include <math.h> // 지수, 로그함수 double exp(double x); // 베이스가자연로그인 e 인 x 제곱값을반환 double ldexp(double x, int exp); // 가수와지수로부터실수값을반환 double frexp(double x, int *eptr); // 실수값에대한가수와지수값을반환 double log(double x); // x 의자연로그를반환 double log10(double x); // 베이스가 10 인 x 의로그 ( 상용로그 ) 값을반환 double pow(double x, double y); // x 의 y 승값을반환 double sqrt(double x); // x 의 0 이아닌제곱근을반환 43

수학관련함수 (cont d) 수학계산함수 (cont d) #include <math.h> // 나눗셈, 나머지함수 div_t div(int n, int denom); // 두정수로나눗셈을하고몫과나머지구조체를반환 ldiv_t ldiv(long n, long denom); // long 형정수로나눗셈후몫과나머지구조체반환 // 실수 x 를정수부분과실수부분으로분해 double modf(double x, double *inptr); // 실수 x 를실수 y 로나눈나머지를계산 double fmod(double x, double y); 44

수학관련함수 (cont d) 수학계산함수 (cont d) #include <math.h> // 삼각함수 double asin(double x); // x 의 arc sine 계산 double acos(double x); // x 의 arc cosine 계산 double atan(double x); // x 의 arc tangent 계산 double atan2(double y, double x); // x 의 arc tangent 계산 double sin(double x); double cos(double x); double tan(double x); double sinh(double x); // x 의 hyperbolic sine 을계산 double cosh(double x); // x 의 hyperbolic cosine 을계산 double tanh(double x); // x 의 hyperbolic tangent 을계산 45

참고문헌 [1] SAMUEL P. HARBISON Ⅲ, GUY L. STEELE, C 프로그래밍언어 : C : A Reference Manual 5/e, Pearson Education Korea, pp. 428 657. [2] Brian W. Kernighan, Dennis M. Ritchie, The C Programming Language 2/e, 대영사, pp. 317 358. 46