C 언어에서 헤더 파일에는 미리 정의된 표준 라이브러리 함수 집합이 포함되어 있습니다. "#include" 전처리 지시어는 프로그램에 확장자가 ".h"인 헤더 파일을 포함하는 데 사용됩니다.
다음은 C 언어로 된 일부 헤더 파일을 표시하는 표입니다.
| 시니어 번호 | 헤더 파일 및 설명 |
|---|---|
| 1 | stdio.h 입출력 기능 |
| 2 | conio.h 콘솔 입출력 기능 |
| 3 | stdlib.h 일반 유틸리티 기능 |
| 4 | 수학.h 수학 함수 |
| 5 | 문자열.h 문자열 함수 |
| 6 | ctype.h 문자 처리 기능 |
| 7 | 시간.h 날짜 및 시간 기능 |
| 8 | float.h float 유형의 한계 |
| 9 | limits.h 기본 유형의 크기 |
| 10 | wctype.h 와이드 문자 데이터에 포함된 유형을 판별하는 함수입니다. |
다음은 C 언어로 된 헤더 파일의 예입니다.
예시
#include <stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
int main() {
char s1[20] = "53875";
char s2[10] = "Hello";
char s3[10] = "World";
int res;
res = pow(8, 4);
printf("Using math.h, The value is : %d\n", res);
long int a = atol(s1);
printf("Using stdlib.h, the string to long int : %d\n", a);
strcpy(s2, s3);
printf("Using string.h, the strings s2 and s3 : %s\t%s\n", s2, s3 );
return 0;
} 출력
다음은 출력입니다 -
Using math.h, The value is : 4096 Using stdlib.h, the string to long int : 53875 Using string.h, the strings s2 and s3 : World World