summaryrefslogtreecommitdiff
path: root/CSAPP/dsizes.c
diff options
context:
space:
mode:
Diffstat (limited to 'CSAPP/dsizes.c')
-rw-r--r--CSAPP/dsizes.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/CSAPP/dsizes.c b/CSAPP/dsizes.c
new file mode 100644
index 0000000..7f57bc9
--- /dev/null
+++ b/CSAPP/dsizes.c
@@ -0,0 +1,12 @@
+#include <stdio.h>
+
+int main(void)
+{
+ int dpos32 = (-2147483648 > 0);
+ int hpos32 = (0x80000000 > 0);
+
+ printf("dpos32 %d - hpos32 %d\n", dpos32, hpos32);
+ printf("%ld\n", 1L << (sizeof(long) << 3) - 1);
+
+ return 0;
+}