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 |
Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.
Is python a c language?
Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given
What is the collection of communication lines and routers called?
If I want to initialize the array like. int a[5] = {0}; then it gives me all element 0. but if i give int a[5] = {5}; then 5 0 0 0 0 is ans. what will I do for all element 5 5 5 5 5 in a single statement???
find a number whether it is even or odd without using any control structures and relational operators?
22 Answers Microsoft, Shashank Private Limited,
How do you redirect a standard stream?
how would a 4*3 array A[4][3] stored in Row Major Order?
write a c programme for add of two numbers with out use of arthematic operators
Write a program in c using only loops to print * * * * * *******
What is difference between Structure and Unions?
what will be the output of this program main() { int i=1; while (i<=10); { i++; } }