Sort n Search (written in c)

download Sort n Search (written in c)

If you can't read please download the document

description

C program to read an array , Sort it and Search an element from it.Features implemented # Use of Arrays# Selection sort# Looping# Condition checking using if-else-if# FunctionsBasic program for beginners who need help writing functions/sort/implementation of arrays.

Transcript of Sort n Search (written in c)

#includeint read(int[100],int);int sort(int[100],int);int search(int[100],int);main(){ int arr[100],size,query; printf("Enter the size of the array:\n"); scanf("%d",&size); read(arr,size); sort(arr,size); search(arr,size);}int read(int A[100],int size){ int i=0; printf("Enter the elements one by one\n"); for(i=0;i