Dear Sir,
we are required the bubble sorting programs
Regs
Prem
Answer / vignesh1988i
DESCENDING ORDER Bubble sorting
#include<stdio.h>
#include<conio.h>
void main()
{
int a[100],n;
printf("enter the number of elements :");
scanf("%d",&n);
for(int i=0;i<n;i++)
scanf("%d",&a[i]);
for(i=0;i<n-1;i++)
for(j=0;j<n;j++)
if(a[j]<a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
for(i=0;i<n;i++)
printf("%d\n",a[i]);
getch();
}
thank u
| Is This Answer Correct ? | 3 Yes | 1 No |
Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates
Explain which function in c can be used to append a string to another string?
What is c value paradox explain?
Write a program to print all permutations of a given string.
Why is c known as a mother language?
What are bitwise shift operators in c programming?
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
Differentiate b/w Modify and Update commands giving example.
What is a good data structure to use for storing lines of text?
void main() { int a=1; while(a++<=1) while(a++<=2); }
how to convert binary to decimal and decimal to binary in C lanaguage
7 Answers BPO, Far East Promotions, IBM, RBS,
what is the difference between %d and %*d in c languaga?