Roll No:24CSB0A47 1. Write a function that takes an integer array and its size, along with an integer k. The function should shift the elements of the array to the right by k positions, wrapping around the end. Constraints: You may only use pointer arithmetic, no direct array indexing. Example Input: arr = [1, 2, 3, 4, 5], k=2 Example Output: [4, 5, 1, 2, 3] Ans. 2. Implement a function that transposes a given square matrix in place using only pointers. The function should take a pointer to the first element of the matrix and its size. Constraints: Use nested loops and conditional checks for in-place transposition. Example Input: matrix = [[1, 2], [3, 4]] Example Output: [[1, 3], [2, 4]] Ans. 3. Create a function that reverses a given string in place. The function should use only pointers for manipulation, without any additional arrays. Constraints: Handle cases where the string has special characters and mixed cases. Example Input: "Hello, World!" Example Output: "!dlroW ,olleH" Ans. 4. Design a function that searches for the first instance of an integer in a sorted integer array that satisfies a given condition (e.g., greater than a specified number). Use pointers for the search. Constraints: Avoid using array indices; focus on pointer-based navigation. Example Input: arr = [1, 3, 5, 7, 9, 12], condition: >5 Example Output: 7 Ans. 5. Implement a function that takes an unsorted array of integers and returns the count of distinct elements using pointers. The function should utilize nested loops and conditional statements, but avoid extra data structures. Example Input: arr = [1, 2, 2, 3, 4, 4, 5] Example Output: 5 Ans. 6. Implement a binary search function that uses pointers to locate a target value within a sorted integer array. The function should return the index of the target value or -1 if not found. Constraints: Do not use array indexing; rely entirely on pointers and pointer arithmetic. Example Input: arr = [1, 3, 5, 7, 9], target = 5 Example Output: 2