How can I beautifully design the source code in C for a term paper in a Word, which I will then print?
Answer 1, authority 100%
Use any syntax highlighting service. For example, the first thing in the search is http://hilite.me/ . The highlighted text can be copied and pasted into the Word. Here is another one service.
And there is also a WordPress plugin – ADX Toys 2 WD (easy to google).
Answer 2, authority 25%
Usually, it is enough to insert the text as it is, select a monospaced font (Courier New or Consolas for example) and remove the line spacing. The teachers do not care for the highlight.