Update c.html.markdown

This commit is contained in:
Ruben 2014-12-08 13:27:06 +01:00
parent 0654fc418d
commit 8291fb2d7d

View File

@ -26,13 +26,15 @@ Multi-line comments look like this. They work in C89 as well.
Multi-line comments don't nest /* Be careful */ // comment ends on this line...
*/ // ...not this one!
// Constants: #define <keyword>
// Constants: #define <keyword>
#define DAYS_IN_YEAR 365
// Enumeration constants are also ways to declare constants.
enum days {SUN = 1, MON, TUE, WED, THU, FRI, SAT};
// Enumeration constants are also ways to declare constants.
// All statements must end with a semicolon
enum days {SUN = 1, MON, TUE, WED, THU, FRI, SAT};
// MON gets 2 automatically, TUE gets 3, etc.
// Import headers with #include
#include <stdlib.h>
#include <stdio.h>
@ -57,7 +59,6 @@ int main() {
// print output using printf, for "print formatted"
// %d is an integer, \n is a newline
printf("%d\n", 0); // => Prints 0
// All statements must end with a semicolon
///////////////////////////////////////
// Types