0% found this document useful (0 votes)
5 views

Lab Assignment

Uploaded by

princejha987654
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Lab Assignment

Uploaded by

princejha987654
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Q1: Write a program that swaps two integers using pointers and without using a temporary

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.

You might also like