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