 <p>You can use the ANSI colour codes. Here's an example program:</p> <pre><code>#include &lt;stdio.h&gt; int main(int argc, char *argv[]) { printf("%c[1;31mHello, world!\n", 27); // red printf("%c[1;32mHello, world!\n", 27); // green printf("%c[1;33mHello, world!\n", 27); // yellow printf("%c[1;34mHello, world!\n", 27); // blue return 0; } </code></pre> <p>The <code>27</code> is the <code>escape</code> character. You can use <code>\e</code> if you prefer.</p> <p>There are lists of all the codes all over the web. <a href="http://wiki.archlinux.org/index.php/Color_Bash_Prompt" rel="nofollow noreferrer">Here is one</a>.</p>