summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-07-20 19:04:18 -0600
committermo khan <mo@mokhan.ca>2014-07-20 19:04:18 -0600
commitbc8ee2caefbbfb8e025e235ef03216405981601d (patch)
tree6f845ff7ce39d5de53f379aced6a6026eb35fab2
parente55e0beae554ff4e37a46df5921a6120cddb8d9b (diff)
add char array 2 example.
-rw-r--r--char_array2.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/char_array2.c b/char_array2.c
new file mode 100644
index 0000000..43a69aa
--- /dev/null
+++ b/char_array2.c
@@ -0,0 +1,10 @@
+#include <stdio.h>
+#include <string.h>
+
+int main(int argc, const char *argv[])
+{
+ char message[20];
+ strcpy(message, "hello, world!");
+ printf("%s", message);
+ return 0;
+}