sort_array(int u){int i,r=0;int temp;for(i=0; i<u; i++){for(r=i+1; r<u; r++){if(arr[i]>arr[r]){temp=arr[i];arr[i]=arr[r];arr[r]=temp;}}} printf("\n\nYour sorted array is: ");for(i=0; i<u; i++){ printf("%d ", arr[i]);}return(0);}search_array(int u){int x,i; printf("\nEnter the element you want to search: ");scanf("%d", &x);for(i=0; i<u; i++){if(arr[i]==x){ printf("Your element is present at location number %d", i+1); break;}}return(0);}insert_element(int u){int a,z,i,x; printf("\nEnter a number to include in array: ");scanf("%d", &a); printf("\nEnter the position where u want to place it in array: ");scanf("%d", &z);x=u;if(z<=u||z>0)
Leave a Comment