Set A
Q1) Write a menu driven program to perform the following operations on an
i. Display the elements of an array along with the keys.
ii. Display the size of an array
iii. Delete an element from an array from the given index.
iv. Reverse the order of each element’s key-value pair [Hint: use array_flip()]
v. Traverse the elements in an array in random order [[Hint: use shuffle()].
Q:2) Accept a string from the user and check whether it is a palindrome or not
(Implement stack operations using array built-in functions).
Set B
Q: 1) Declare a Multidimensional Array. Display specific element from a
Multidimensional array. Also delete given element from the Multidimensional
Q: 2) Define an array. Find the element from the array that matches the given
value using appropriate search function.
Set C
Q.1) Write a menu driven program to perform the following stack and queue
related operations:[Hint: use Array_push(), Array_pop(), Array_shift(),
ii. Delete an element from stack
iii. Display the contents of stack
iv. Insert an element in queue
v. Delete an element from queue
vi. Display the contents of queue
Q: 2) Write a menu driven program to perform the following operations on
1. Sort the array by values (changing the keys) in ascending, descending order.
2. Also sort the array by values without changing the keys.
3. Filter the odd elements from an array.
4. Sort the different arrays at a glance using single function.
6. Find the intersection of two arrays.
0 Comments
If anyone has Doubts or suggestions please let me know