#include<stdio.h>
void BubbleSort (int arr[], int n)
{
int i, j, temp;
for(i=0; i<n-1; i++)
{
for(j=0; j<n-1; j++)
{
if(arr[j]>arr[j+1])
{
temp=arr[j];
arr[j]= temp;}}}
void print_arrary(int arr[], int size)
{
int i;
for(i=0, i<size; i++)
int main();
{
int arr[]={20,30,40,50,60,70,80};
int n=size of(arr)/size of (arr[0]);
bubble-sor (arr,n);
return 0
}
I2luY2x1ZGU8c3RkaW8uaD4Kdm9pZCBCdWJibGVTb3J0IChpbnQgYXJyW10sIGludCBuKQp7CiAgICAgaW50IGksIGosIHRlbXA7CiAgICAgZm9yKGk9MDsgaTxuLTE7IGkrKykKICAgICB7CiAgICAgICAgICAgICAgZm9yKGo9MDsgajxuLTE7IGorKykKICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgaWYoYXJyW2pdPmFycltqKzFdKQogICAgICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcD1hcnJbal07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFycltqXT0gdGVtcDt9fX0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdm9pZCBwcmludF9hcnJhcnkoaW50IGFycltdLCBpbnQgc2l6ZSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcihpPTAsIGk8c2l6ZTsgaSsrKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByaW50ZigiJWQiLCBhcnJbaV0pOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBtYWluKCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgYXJyW109ezIwLDMwLDQwLDUwLDYwLDcwLDgwfTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IG49c2l6ZSBvZihhcnIpL3NpemUgb2YgKGFyclswXSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByaW50ZigiVW5zb3J0ZWQgYXJyeTpcbiIpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmludC1hcnJheShhcnIsbik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1YmJsZS1zb3IgKGFycixuKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRmKCJcbiBzb3J0ZWQgYXJyeVxuKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQo=
#include<stdio.h>
void BubbleSort (int arr[], int n)
{
int i, j, temp;
for(i=0; i<n-1; i++)
{
for(j=0; j<n-1; j++)
{
if(arr[j]>arr[j+1])
{
temp=arr[j];
arr[j]= temp;}}}
void print_arrary(int arr[], int size)
{
int i;
for(i=0, i<size; i++)
printf("%d", arr[i]);
int main();
{
int arr[]={20,30,40,50,60,70,80};
int n=size of(arr)/size of (arr[0]);
printf("Unsorted arry:\n");
print-array(arr,n);
bubble-sor (arr,n);
printf("\n sorted arry\n);
return 0
}