code for bubble sort?
Answer / ansar husain
void main()
{
int A[50];
int n,j,t ;
printf("enter the size of array:=>");
scanf("%d",&n);
printf("enter the %d value in array:=>%d",n);
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
if(A[i]>A[j])
{
i=a[i];
A[i]=a[j];
A[j]=t;
}
}
}
printf("after the shorting:=>\n");
for(i=0;i<n;i++)
{
printf("%d",A[i]);
}
getch();
| Is This Answer Correct ? | 1 Yes | 6 No |
What is the use of #define preprocessor in c?
main() { intx=2,y=6,z=6; x=y=z; printf(%d",x) }
5 Answers Amazon, HCL, Thought Works,
What type of function is main ()?
what is the output of the following program? main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }
How does placing some code lines between the comment symbol help in debugging the code?
Is c dynamically typed?
What is the ANSI C Standard?
Program to find the sum of digits of a given number until the sum becomes a single digit
Why is c not oop?
How to swap 3 numbers without using 4th variable?
How to receive strings with spaces in scanf()
What is the difference between declaring a variable by constant keyword and #define ing that variable?