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 find the number, given by the user to be searched in Array, is in the array or not and the position of the element. [The number found at 5th position, or the number not found in Array]
9) Write a program to accept 10 elements in an array and occurrence of the number in array. [ 5 occurred 3 times]
10) Write a program to accept 10 elements in an array and transfer the elements in another array.
11) Write a program to accept 10 elements in an array and transfer the elements in another array in reverse order.
12) Write a program to accept 10 elements in an array and transfer the elements in another array with the following condition:
a) If element is odd, transfer the square of the element .
b) If element is even, transfer the cube the element .
13) 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).
14) Write a program to accept 5 elements in 2 arrays and Merge the numbers in a new array. [Take the size of the Arrays from the user]
Input: Enter the size of First Array:4
Input: Enter the size of Second Array:6
15) 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.
16) 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.
17) Write a program to accept 10 elements in an array and accept the position. Delete the number and shift all the elements up.
18) Write a program to accept 10 elements in Ascending order in an array. Perform the Binary search.
19) 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.
20) Write a program to accept 10 elements in an array. Sort the elements using Bubble Sort technique.
21) Write a program to accept 10 elements in an array. Sort the elements using Selection/Exchange Sort technique.