#include<stdio.h>
#include<conio.h>
#include<alloc.h>
void main()
{
int a[5];
int i,j,n,temp;
clrscr();
printf("\n enter the limit of array");
scanf("\n %d",&n);
a[i]=(int) calloc(n,sizeof(int));
printf("\n enter the array element");
for(i=0;i
{
scanf("\n %d",&a[i]);
}
for(i=0;i
{
for(j=i+1;j
{
if(a[i]>a[j]){
temp=a[i];
a[i]=a[j];
a[j]=temp;
}
}
}
printf("\n the asending elements are");
for(i=0;i
{
printf("\n %d",a[i]);
}
getch();
}
Output:
/