TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

C Tutorials

C Program Files & Formats

Overview

In this tutorial, we will learn about different C Program files and file formats. The different file formats involved in designing, compiling, and running a C program are as follows:

  • Source file
  • Header file
  • Object file
  • Executable file

Source File

The C Source file contains the source code of the C program. The file contains source code that defines the main() function and may contain user-defined functions. The file extension of the source file is *.c

For example, hello.c

C Source Code .c File

Header File

The C header file contains the C function declarations and macro definitions and is to be shared between several source files. The file extension of the C header file is *.h

For example, utility.h

C Header .h File

Object File

An object file is a file containing object code i.e relocatable format machine code that is usually not directly executable. Object files are produced by language translators like an assembler, or compiler and used as input to the linker program, which in turn generates an executable or library by combining the object files. The file extension of the C object file is *.o

For example, hello.o

C Object .o Files

Executable File

The binary executable file is generated by the linker program. The linker links the
various object files to produce a binary file that can be directly executed. The
typical file extension of the executable file is *.exe

For example, hello.exe

C Executable .exe File

 

—

C Tutorials

C Tutorials on this website can be found at:

https://www.testingdocs.com/c-language-tutorial/

Related Posts

C Language Characteristics

C Tutorials /

C Language Characteristics

GNU Compiler Collection GCC

C Tutorials /

C Compilers

C Pointers

C Tutorials /

C Pointers

C Tutorials /

C Two-Dimensional Arrays

Declare C Arrays

C Tutorials /

C Arrays

‹ C Compilers› C Language Characteristics

Recent Posts

  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version