Array programs
1) Write a program to accept 10 elements in an array and print the elements.
2) Write a program to accept 10 elements in an array and print the elements in reverse order.
3) Write a program to accept 10 elements in an array and the sum of the elements.
4) Write a program to accept 10 elements in an array and find and print smallest element.
5) Write a program to accept 10 elements in an array and find and print greatest element.
6) Write a program to accept 10 elements in an array and find and print smallest and greatest element.
7) Write a program to accept 10 elements in an array and find the number, given by the user to be searched in Array, is in the array or not. [The number found, or the number not found in Array]
8) Write a program to accept 10 elements in an array and occurrence of the number in array. [ 5 occurred 3 times]
9) Write a program to accept 10 elements in an array and transfer the elements in another array.
10) Write a program to accept 10 elements in an array and transfer the elements in another array in reverse order.
11) Write a program to accept 10 elements in an array and transfer the elements in another array with the following condition:
a) If number is odd, transfer the square of the number.
b) If number is even, transfer the cube the number.
12) Write a program to accept 10 elements in an array and find the number and replace with another number (both numbers have to be taken as input from user).
13) Write a program to accept 5 elements in 2 arrays and Merge the numbers in a new array.
14) Write a program to accept 10 elements in an array and accept the position from the user and from that point reverse the numbers which are in array.
15) Write a program to accept 10 elements in an array and accept the position and number. Insert the number to the position and shift all the elements down.
16) Write a program to accept 10 elements in an array and accept the position. Delete the number and shift all the elements up.
17) Write a program to accept 10 elements in an array. Using the Menu-Driven approach display the following, as per user's choice:
a) All the Armstrong numbers stored in array.
b) All the Perfect numbers stored in array.