1.

Write a c program to sort an array of 5 name using bubble sort algorithm

Answer»

Answer:

INT is_Array_Sorted(int [], int); int main() { PRINTF("ENTER number of elements\n"); scanf("%d", &n); printf("Enter %d integers\n", n); for (C = 0; c < n; c++) scanf("%d", &a[c]); if (is_Array_Sorted(a, n)) printf("The array is sorted.\ return 0; } int is_Array_Sorted(int a[], int n) { int c, d, sorted = 1, t;



Discussion

No Comment Found