
- C++ Basics
- C++ Home
- C++ Overview
- C++ Environment Setup
- C++ Basic Syntax
- C++ Comments
- C++ Data Types
- C++ Variable Types
- C++ Variable Scope
- C++ Constants/Literals
- C++ Modifier Types
- C++ Storage Classes
- C++ Operators
- C++ Loop Types
- C++ Decision Making
- C++ Functions
- C++ Numbers
- C++ Arrays
- C++ Strings
- C++ Pointers
- C++ References
- C++ Date & Time
- C++ Basic Input/Output
- C++ Data Structures
- C++ Object Oriented
- C++ Classes & Objects
- C++ Inheritance
- C++ Overloading
- C++ Polymorphism
- C++ Abstraction
- C++ Encapsulation
- C++ Interfaces
Standard header files in C
In C language, header files contain the set of predefined standard library functions. The “#include” preprocessing directive is used to include the header files with “.h” extension in the program.
Here is the table that displays some of the header files in C language,
Sr.No. | Header Files & Description |
---|---|
1 | stdio.h Input/Output functions |
2 | conio.h Console Input/Output functions |
3 | stdlib.h General utility functions |
4 | math.h Mathematics functions |
5 | string.h String functions |
6 | ctype.h Character handling functions |
7 | time.h Date and time functions |
8 | float.h Limits of float types |
9 | limits.h Size of basic types |
10 | wctype.h Functions to determine the type contained in wide character data. |
Here is an example of header files in C language,
Example
#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; }
Output
Here is the output −
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
- Related Articles
- C++ Standard Library Header Files
- Header files “stdio.h” and “stdlib.h” in C
- Why does C++ have header files and .cpp files?
- Explain the custom header files in C language
- Print “Hello World” in C/C++ without using header files
- Add new header files in Arduino IDE
- What is the common header format of Python files?
- clocale header file in C++
- What are Standard Libraries in C++?
- Standard Input Stream (cin) in C++
- C Programming Language Standard
- Getting the Standard Output and Standard Error Output Stream through Console in C#
- List files recursively in C#
- How to write my own header file in C?
- Multiset in C++ Standard Template Library (STL)

Advertisements