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 |
How can you tell whether a program was compiled using c versus c++?
What is your stream meaning?
Describe newline escape sequence with a sample program?
What is meant by 'bit masking'?
how to find your architecture is LittleEndian or BigEndian?
Is there any demerits of using pointer?
When should the register modifier be used? Does it really help?
Write a program to print all permutations of a given string.
What is the modulus operator?
How can I copy just a portion of a string?
What is a static variable in c?
main() { intx=2,y=6,z=6; x=y=z; printf(%d",x) }
5 Answers Amazon, HCL, Thought Works,