- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference between Header file and Library
In programming of any language such as C,C#,Java or any other programming language both header file and library combines and provide some specific API and its functionality to be used or consumed in the main file. So both header file and library are combined and used as single unit and we can't differentiate between both as these are not in the same context.
But on the basis of files nature we can distinguish between Header File and Library as follows −
|Sr. No.||Key||Header file||Library|
|1||Definition||Header File is the file where all the headers name are mentioned that going to be used or consumed in the main code file.||On other hand Library is the file where the implementation code of each header is written down which is mentioned in the Header file.|
|2||File Extension||With the resemblance of its name Header file have the extension of .h.||On other hand Library file have the extension of .lib.|
|3||File Nature||As already mentioned Header file have only header name i.e., it have the function declaration only.||On other hand in case of Library file it have the implementation code of the header i.e., it has the actual function definition which is declared in the Header file.|
|4||File Location||Header files are available inside include sub directory which itself is in Turbo compiler.||On other hand Library files are available inside lib sub directory which also itself is in Turbo compiler.|
|5||File Format||As Header file only have header name so are human readable as they are in the form of source code.||On other hand Library files have actual implementation code so are non human readable as they are in the form of machine code.|
- Difference between File and Folder
- C++ Standard Library Header Files
- Difference between .extend() / .assign() and .merge() in Lodash library.
- clocale header file in C++
- Difference between FAT32, exFAT, and NTFS File Systems.
- State the difference between file systems and DBMS?
- Difference between File Transfer Protocol (FTP) and Secure File Transfer Protocol (SFTP)
- Python - Read csv file with Pandas without header?
- What's the difference between "STL" and "C++ Standard Library"?
- How to write your own header file in C?
- How to write my own header file in C?
- Using header rows during flat file upload in SAP HANA
- How to read a Pandas CSV file with no header?
- Difference between C# and .Net