Answer the question
In order to leave comments, you need to log in
What is the C programming language written in?
What is the C programming language written in?
Answer the question
In order to leave comments, you need to log in
Consider that a programming language is just a set of specifications and rules. It is written in English.
If you are interested in what C compilers are programmed in, then the most popular developing compilers today are written in C and C ++, respectively:
gcc: https://github.com/gcc-mirror/gcc
clang: https://github.com/llvm /llvm-project/tree/main/clang
You ask, how was the C compiler written in C itself? The answer is simple - the first compilers were written in assembler. They were very simple and stupid, perhaps they did not know how to understand all the subtleties of the language. When there was a sufficiently working compiler with a minimal set of functions, it was possible to rewrite it in C and compile it with the first compiler. After that, it became possible to compile the C compiler by yourself.
In the same way, new language features are added to compilers - they implement the code for compiling these things without using them in the source code and get a compiler that can compile them. You can then rewrite the compiler source code to use these new features, using the compiler executable you got earlier.
And so, probably, there are a bunch of unsupported legacy C compilers in all sorts of languages.
C compilers are written in c++ and c. In gcc, most of the code is in C, while clang is written in C ++
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question