summaryrefslogtreecommitdiff
path: root/CSAPP/chap3/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'CSAPP/chap3/main.c')
-rw-r--r--CSAPP/chap3/main.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/CSAPP/chap3/main.c b/CSAPP/chap3/main.c
new file mode 100644
index 0000000..b4f7152
--- /dev/null
+++ b/CSAPP/chap3/main.c
@@ -0,0 +1,17 @@
+#include <stdio.h>
+
+void multstore(long, long, long*);
+
+int main(void)
+{
+ long d;
+ multstore(2, 3, &d);
+ printf("2 * 3 --> %ld\n", d);
+ return 0;
+}
+
+long mult2(long a, long b)
+{
+ long s = a * b;
+ return s;
+}