- "description": "<p><em>Estimated time: 5 minutes</em></p>\r\n<p>You have just built a simple calculator. When typing <code>ls</code> in your command line, the source folder has the following structure:</p>\r\n<pre class=\"console\"><code>calc.c calc.h Makefile operations.c operations.h</code></pre>\r\n<p><code>calc.c</code> contains the calculator which handles the 4 basic operations: addition, substraction, multiplication, and division. These 4 operations are implemented in <code>operations.c</code>.</p>\r\n<p>As you might have noticed, there are also two other files: <code>calc.h</code> and <code>operations.h</code>. These are the corresponding <strong>header</strong> files of <code>calc.c</code> and <code>operations.c</code>. These headers contain the function prototypes and specifications, but not their definitions. They can also contain <code>extern</code> declarations of variables. For more on that, see <a href=\"https://www.tutorialspoint.com/cprogramming/c_header_files.htm\">this page</a> or chapter 4 in <a href=\"#kernighan2006c\" class=\"citation\">[kernighan2006c]</a>.</p>\r\n<p>When compiling this calculator, you need to specify in the <code>Makefile</code> rules the header files needed by <code>calc.c</code>, that is both <code>calc.h</code> and <code>operations.h</code>.</p>\r\n<hr />\r\n<div id=\"citations\">\r\n<dl>\r\n<dt><span id=\"kernighan2006c\" class=\"citation-label\">kernighan2006c</span></dt>\r\n<dd><p>Kernighan, B. W., & Ritchie, D. M. (2006). The C programming language.</p>\r\n</dd>\r\n</dl>\r\n</div>\r\n",
0 commit comments