Lab Assignment
Lab Assignment
variable.
Q2: Write a function using pointers that finds the largest and smallest elements in an integer
array and returns their values to the calling function.
Q3: Write a function that takes a 2D array (matrix) and its dimensions as arguments and
prints its transpose using pointer notation.
Q4: Write a function using pointers that takes an integer array and an integer K as input, and
cyclically left rotates the array K times. Display the rotated array.
Q5: Write a function using pointers that merges two sorted arrays into a single sorted array.
The function should return the merged array to the calling function.
Q6: Write a function using pointers to find the second largest element in an integer array.
The function should return the second largest value to the calling function.
Q7: Write a program using pointers to find the length of a string without using the strlen
function.