Thread: C related file extensions

  1. #1
    Registered User
    Join Date
    Jun 2007

    C related file extensions

    what is the file extension for an expanded source code file <after the macros expansions have been replaced in the source code> ?

    i expect the expanded source code to be ".c" itself, however, YK refers to it by a ".i" extension - things in YK are hard to believe, can some1 elucidate on that

    What other extensions are used wrt. to C Programming?

    .h -> header
    .c -> source file
    .o -> object file

    anything else?

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Rishon LeZion, Israel
    objects can be .obj (on windows for example)
    .lib - for libraries
    .dll - for dynamic-linked libraries
    .exe - for executables
    .mak - for make files
    .asm - for generated assemble units
    .dsp - for IDE projects
    .dsw - for IDE workspaces
    .sln - for IDE workspaces (solutions)
    .rc - for resource file scripts
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    David J. Wheeler

  3. #3
    Massively Single Player AverageSoftware's Avatar
    Join Date
    May 2007
    Buffalo, NY
    GCC flows likes this:

    program.c -> preprocesses into
    program.i -> compiles into
    program.s -> assembles into
    program.o -> links into

  4. #4
    Registered User
    Join Date
    Jun 2007


    Thank you !

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    > what is the file extension for an expanded source code file
    Read your compiler documentation.
    .c is the standard input file type, but anything which is an intermediate or output file is going to be system specific in some way.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File transfer- the file sometimes not full transferred
    By shu_fei86 in forum C# Programming
    Replies: 13
    Last Post: 03-13-2009, 12:44 PM
  2. Problems passing a file pointer to functions
    By smitchell in forum C Programming
    Replies: 4
    Last Post: 09-30-2008, 02:29 PM
  3. Formatting the contents of a text file
    By dagorsul in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2008, 12:36 PM
  4. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 02:58 AM