If a programme written in C needs system calls for execution, how can the operating system be written in C?

Posted by ADG_98@reddit | learnprogramming | View on Reddit | 47 comments

If I write a small command line programme in C, such as outputting the sum of two numbers, it need system calls for its execution. My question is how can the operating system also be written in C? How would the operating system make system calls?