Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is C open source?

This is probably a stupid question, but I've been wondering about this for a while. Does C (or any other low-level language, for that matter) even have source, or is the compiler the part that "does all the work", including parsing? If so, couldn't different compilers have different C dialects? Where does the stdlib factor into this? I would really like to know how this works.

like image 892
Hypercube Avatar asked Feb 24 '11 01:02

Hypercube


People also ask

Is C C++ open source?

C++ itself is a language, not a specific implementation, so there's no source code available for the standard/language itself. Some C++ implementations are open source (e.g., Gnu and Clang). Show activity on this post. C++ is a code standard defined by the International Organization of Standardization (ISO).

Is C language free to use?

If you are using a UNIX machine (for example, if you are writing CGI scripts in C on your host's UNIX computer, or if you are a student working on a lab's UNIX machine), the C compiler is available for free. It is called either "cc" or "gcc" and is available on the command line.

Is Python an open source?

Python is developed under an OSI-approved open source license, making it freely usable and distributable, even for commercial use. Python's license is administered by the Python Software Foundation.

Is C created by Microsoft?

The C# programming language was designed by Anders Hejlsberg from Microsoft in 2000 and was later approved as an international standard by Ecma (ECMA-334) in 2002 and ISO/IEC (ISO/IEC 23270) in 2003. Microsoft introduced C# along with .


2 Answers

The C language is not a piece of software but a defined standard, so one wouldn't say that it's open-source, but rather that it's an open standard.

There are a gazillion different compilers for C however, and many of those are indeed open-source. The most notable example is GCC's C compiler, which is all under the GNU General Public License (GPL), an open-source license.

There are more options. Watcom is open-source, for instance. There is no shortage of open-source C compilers, but without a doubt the most widespread one, at least in the non-Windows world, is GCC.

For Windows, your best bet is probably Watcom or GCC by using Cygwin or MinGW.

like image 161
Teekin Avatar answered Sep 19 '22 11:09

Teekin


C is a standard which specifies how C compilers should generate programs.
C itself doesn't have any source code, just like a musical note doesn't have any plastic.

Some C compilers, such as GCC, are open source.

like image 27
SLaks Avatar answered Sep 20 '22 11:09

SLaks