Question: how c compiler is written in c itself?
Answer: Any modern C language compiler is mostly written in C with optional assembly code here and there. So compilers like GCC, clang or Visual C++ is nothing but huge C/C++ projects in its source format.