summaryrefslogtreecommitdiffhomepage
path: root/c.html.markdown
diff options
context:
space:
mode:
authormhauserr <michael.hauser-raspe@cantab.net>2013-08-20 23:50:15 +0100
committermhauserr <michael.hauser-raspe@cantab.net>2013-08-20 23:50:15 +0100
commit07b5c4934ce98d9f3431c23d5e56a46faba77360 (patch)
tree305b4050fa6f10da99f071804c8d76a7dfe890eb /c.html.markdown
parent598fe61e1a9968eb633d97ef214b01c7d3f0d942 (diff)
Update c.html.markdown
Added explanation of size_t
Diffstat (limited to 'c.html.markdown')
-rw-r--r--c.html.markdown1
1 files changed, 1 insertions, 0 deletions
diff --git a/c.html.markdown b/c.html.markdown
index 24a96463..ae66fa78 100644
--- a/c.html.markdown
+++ b/c.html.markdown
@@ -81,6 +81,7 @@ int main() {
// is not evaluated (except VLAs (see below)).
// The value it yields in this case is a compile-time constant.
int a = 1;
+ // size_t is an unsiged integer type of at least 2 bytes used to represent the size of an object
size_t size = sizeof(a++); // a++ is not evaluated
printf("sizeof(a++) = %zu where a = %d\n", size, a);
// prints "sizeof(a++) = 4 where a = 1" (on a 32-bit architecture)