Question: Task 2 : Run the following code ready for string functions. Use one function at a time and observe the output . 2 . 1

Task 2: Run the following code ready for string functions. Use one function at a time and observe the output.2.1 What is the purpose of the strcpy() function in this code?2.2 What would be the result if we uncommented the line //strcpy(b,a);? Explain.2.3 If we uncommented the line //strncpy(a, b,2);, what would be the value of string a after executing that line?2.4 Describe the functionality of the strcat() function. What would be the result if we uncommented the line ////strcat(a,b); ?2.5 Explain what happens when we use the strncat() function. If we uncommented the line //strncat(a,b,3); , what would be the value of string a after executing that line?2.6 What is the purpose of the strlen() function? What would be the value of x if we uncommented the line ////x=strlen(a);?
 Task 2: Run the following code ready for string functions. Use

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!