summaryrefslogtreecommitdiff
path: root/wk2/lect/greet.c
diff options
context:
space:
mode:
Diffstat (limited to 'wk2/lect/greet.c')
-rw-r--r--wk2/lect/greet.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/wk2/lect/greet.c b/wk2/lect/greet.c
new file mode 100644
index 0000000..ccecd7d
--- /dev/null
+++ b/wk2/lect/greet.c
@@ -0,0 +1,10 @@
+#include <stdio.h>
+#include <cs50.h>
+
+//argc is argument count, ie how many arguments were given
+//argv is an array of the arguments given
+//argv[0] is the command that calls the script, ie ./greet
+int main(int argc, string argv[])
+{
+ printf("hello, %s\n", argv[1]);
+}