Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
C Program for SORTING OF NUMBERS
main()
{
int a[20],i,j,temp,n;
clrscr();
printf("ENTER THE MAXIMUM LIMIT: ");
scanf("%d",&n);
for(i=1;i<=n;i++)
printf("ENTER %d ELEMENT: ",i);
scanf("%d",&a[i]);
}
for(i=1;i<=n-1;i++)
for(j=i+1;j<=n;j++)
if(a[i]>a[j])
temp=a[i];
a[i]=a[j];
a[j]=temp;
printf("\nTHE SORTED ELEMENTS ARE. \n");
for(j=1;j<=n;j++)
printf(" %d",a[j]);
getch();
OUTPUT :
ENTER THE MAX. LIMIT: 5
ENTER 1 NO: 5
ENTER 2 NO: 8
ENTER 3 NO: 10
ENTER 4 NO: 1
ENTER 5 NO: 2
THE SORTED ELEMENTS ARE:
1 2 5 8 10
It is a pointer accessible only in the member functions of a struct, class or union type. It points to the object for which the member function is called. Static member functions d
Does improper inheritance have a potential to wreck a project? Many projects meet a dead end due to bad inheritance. Hence it certainly has potential to wreck a project. Sma
What is Union? Intimately associated with the structure is the union which as well contains multiple members. Unlike a structure but the members of a union share the same stora
Write a program that takes 3 small letters as input and sort them according to their ASCII value.
I need to implement a mini version of linux''s ''tar'' function in C.
# c pragram TO count the number of occurances of the string in nth padovan''s string program in java // aakash , suraj , prem sasi kumar kamaraj college program 1 : pa
Pure Virtual Functions An abstract class is one, which is used just for deriving some other classes. No object of this class is declared and used in the program. Likewise, ther
Explain Rules for constructing variable names? The Rules for constructing variable names : a) A variable name is any combination of alphabets, 0 to 9 digits and undersc
A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome
A: C++, unlike only about every other language with exceptions, is extremely accomodating while it comes to what you can throw. Actually, you can throw anything you akin to. That b
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd