0

How to bubble sort 2D array?

I have this cod and i want to bubble sort it #include <stdio.h> #include <stdlib.h> #define MAX 10 int main() { int tal[MAX][MAX]; int i, n; for(i=0; i < 10; i++){ for(n=0; n < 10; n++){ printf("%d ", rand()%900); } printf("\n"); } }

21st Nov 2020, 1:34 PM
Abada Aroub
Abada Aroub - avatar
1 Respuesta
+ 1
Where is there sorting code? You are not adding values to array also.. First add values to array (instead printing, add to array by tal[i][n] = rand() %900), then sort those values..
21st Nov 2020, 2:23 PM
Jayakrishna 🇮🇳