summaryrefslogtreecommitdiffhomepage
path: root/c.html.markdown
diff options
context:
space:
mode:
authorLevi Bostian <levi.bostian@gmail.com>2014-10-17 20:57:18 -0500
committerLevi Bostian <levi.bostian@gmail.com>2014-10-17 20:57:18 -0500
commit0ec14c6914ae9a0c968b8f2e70e31b43f3aaaf73 (patch)
treec0c6a71522d6b9935dbfe5e25b9e7daa5bf28951 /c.html.markdown
parent01b671bf398001647650db24dcc51f584ea82490 (diff)
Add fixes from @marcom's PR https://github.com/adambard/learnxinyminutes-docs/pull/765
Diffstat (limited to 'c.html.markdown')
-rw-r--r--c.html.markdown9
1 files changed, 7 insertions, 2 deletions
diff --git a/c.html.markdown b/c.html.markdown
index 10e6fa45..6daabe94 100644
--- a/c.html.markdown
+++ b/c.html.markdown
@@ -5,6 +5,7 @@ contributors:
- ["Adam Bard", "http://adambard.com/"]
- ["Árpád Goretity", "http://twitter.com/H2CO3_iOS"]
- ["Jakub Trzebiatowski", "http://cbs.stgn.pl"]
+ - ["Marco Scannadinari", "https://marcoms.github.io"]
---
@@ -21,6 +22,10 @@ memory management and C will take you as far as you need to go.
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>
#define DAYS_IN_YEAR 365
@@ -74,10 +79,10 @@ int main() {
long long x_long_long = 0;
// floats are usually 32-bit floating point numbers
- float x_float = 0.0;
+ float x_float = 0.0f; // 'f' suffix here denotes floating point literal
// doubles are usually 64-bit floating-point numbers
- double x_double = 0.0;
+ double x_double = 0.0; // real numbers without any suffix are doubles
// Integral types may be unsigned.
unsigned short ux_short;