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 are the rules for identifiers in c?
how to find binary of number?
How we can insert comments in a c program?
What is 1f in c?
How does selection sort work in c?
Is c compiled or interpreted?
Write a program to print factorial of given number without using recursion?
Explain what math functions are available for integers? For floating point?
What is the difference between exit() and _exit() function?
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
What are enumerated types?
One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.
Can you please explain the difference between malloc() and calloc() function?
How can I swap two values without using a temporary?
What is an auto variable in c?