Week 9: Wednesday ----------------- Q1. (35) Input two strings s and t from the user. Assume that the strings do not contain blank or any whitespace character. Write a function that concatenates t to s, i.e., it modifies s by appending t to it. The parameters of the function concat contains only pointers to characters (not arrays): void concat(char *s, char *t) Avoid using notations of the form *(s + i) that simulates s[i]. Q2. (65) Write a program that left rotates an array. The program inputs an integer array of size 10, the elements of the array and an integer k. The array must be left rotated k places. Note that k can be negative, in which case, the array should be right rotated k times. For example, if the input is 0 1 2 3 4 5 6 7 8 9 and k is 2, the output should be 2 3 4 5 6 7 8 9 0 1 If the input is 0 1 2 3 4 5 6 7 8 9 and k is -3, the output should be 7 8 9 0 1 2 3 4 5 6 You cannot use another temporary array. You can swap two elements of the array. Also, you cannot simply left rotate the array k times by shifting it through 1 place each time.