Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please answer all parts, thanks! Compile appendTest.c (at the bottom) and record your answers. 1. Run the program with the following input: HELLO! for str1
Please answer all parts, thanks!
Compile appendTest.c (at the bottom) and record your answers. 1. Run the program with the following input: "HELLO!" for str1 and "hello!" for str: Is the output expected? 2. Do not stop the program, enter "HI!" for str1 and "hi!" for str2. Is the output expected? What is the bug here? Try to fix the program so it will print the output correctly. 3. Do not stop the program, enter "Hello! How are you?" for str1 and "I am fine, thank you!" for str2. Is the output expected? Why do you think this happens? NO NEED TO FIX THIS Stop the program by pressing Ctrl+C \#inc lude \#include / Return the result of appending the characters in s2 to s1. Assumption: enough space has been allocated for s1 to store the extra characters. */ // DO NOT change the definition of the append function when it comes to // adding/removing/modifying the function parameters, or changing its return // type. You may, however, modify the body of the function if you wish. char* append(char s1[], char s2[]) \{ int s1len = str len(s1); int s2 len =strlen(s2); int k; for (k=0;kStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started