Bubble Sort, Bubble Sort Algorithm, Data Structure Algorithm, Dsa Courses, Naem Azam.
cin >> n; //Taking size of array int arr[n]; cout << "Enter " << n << " elements : "; for (int i = 0; i < n; i++) { cin >> arr[i]; //Takig array elements } bubble_sort(arr, n); //Calling Function cout << "Final Array : "; for (int i = 0; i < n; i++) cout << arr[i] << " "; //Printing Sorted array