summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2024-02-27 20:38:40 +0000
committerFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2024-02-27 20:38:40 +0000
commita5b1a43bfc2887994604b494ff2e48f028485439 (patch)
treedf1284e0b932e5b4bba3ae7786a4f4a64d37f52d
parentc215a3a4e8a45455e7a0f03922ce352298a26431 (diff)
Tue, Feb 27, 2024, 12:38 PM -08:00
-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);
+}