The greatest mistake you can make in life is to be continually fearing you will make one

Wednesday 10 March 2010

C programs based on Array

1.Write a program to copy the contents of one array in to another in the reverse order.
2.If an array name contains n elements,then write a program to check if name[0]=name[n-1],name[1]=name[n-2] and so on.
3.Write a program to initialize an integer array of 10 elements,pass the entire array to a function multiply() and in multiply(),multiply each element of array by 10 and return the control to main() and print the new array elements in main().
4.20 numbers are entered from the keyboard into an array. Write a program to find out how many of them are positive,how many are negative,how many are even and how many are odd.
5.Write a program to search a given number is present in the array or not
6. Implement the selection sort,bubble sort and insertion sort algorithms on a set of 10 numbers

No comments:

Post a Comment