From 06fd14c57c642ad0d1ccb8b4685c1e0d14b0aaa3 Mon Sep 17 00:00:00 2001 From: zleyyij <75810274+zleyyij@users.noreply.github.com> Date: Sun, 3 Nov 2024 14:35:04 -0700 Subject: [PATCH] vault backup: 2024-11-03 14:35:04 --- .../ECE1400/Chapter 13 Exercises.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/education/software development/ECE1400/Chapter 13 Exercises.md b/education/software development/ECE1400/Chapter 13 Exercises.md index a953771..33af519 100644 --- a/education/software development/ECE1400/Chapter 13 Exercises.md +++ b/education/software development/ECE1400/Chapter 13 Exercises.md @@ -55,6 +55,16 @@ strcat(str, ""); > **9.** What will be the value of the string `s1` after the following statements have been executed? ```c +// Assuming `str` is an empty string with enough space to store everything: strcpy(str, "tire-bouchon"); -strcpy(&str[4], "d-or-wi") +// "tire-bouchon" +strcpy(&str[4], "d-or-wi"); +// "tired-or-wir" +strcat(str, "red?"); +// "tired-or-wired?" +``` + +Expected output: +```c +"tired-or-wired?" ``` \ No newline at end of file