summaryrefslogtreecommitdiff
path: root/wk4/lect/copy.c
diff options
context:
space:
mode:
Diffstat (limited to 'wk4/lect/copy.c')
-rw-r--r--wk4/lect/copy.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/wk4/lect/copy.c b/wk4/lect/copy.c
new file mode 100644
index 0000000..9a61c04
--- /dev/null
+++ b/wk4/lect/copy.c
@@ -0,0 +1,17 @@
+#include <cs50.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+int main(void)
+{
+ string s = get_string("s: ");
+
+ string t = s;
+
+ t[0] = toupper(t[0]);
+
+ printf("%s\n", s);
+ printf("%s\n", t);
+}