.c C++ source code

Text & source code

MIME typetext/x-c++src
text/x-csrc
DescriptionC++ source code
CategoryText & source code
Based ontext/x-csrc
Other extensions.c++, .cc, .cpp, .cxx

Frequently asked questions

What is a .c file?

The .c extension is used for several formats: C++ source code (text/x-c++src) and C source code (text/x-csrc).

How do I open a .c file?

With any text editor – Notepad++, Visual Studio Code, or gedit and vim on Linux. The file contains readable text, possibly source code or configuration.

How can you tell a genuine .c file?

No fixed signature at the start of the file is registered for this format; it is recognised mainly by its extension. On Linux and macOS, file --mime-type example.c shows the guessed type.

Which format is .c based on?

Technically a .c file is a subtype of “C source code” (text/x-csrc), so programs for that base format can often read it too.

Which MIME type belongs to .c?

The MIME type is text/x-c++src. In the Apache web server: AddType text/x-c++src .c; in nginx: types { text/x-c++src c; }.

Nearby entries