Answer Posted / 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 |
Post New Answer View All Answers
What is difference between scanf and gets?
What are different storage class specifiers in c?
What is #include stdio h?
Can you pass an entire structure to functions?
What are the different data types in C?
How can you be sure that a program follows the ANSI C standard?
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
What is a pointer value and address in c?
Explain what are global variables and explain how do you declare them?
hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...
Define the scope of static variables.
the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset
What does c mean in standard form?
What is main () in c?