Answer Posted / ashutosh shashi
for(i=0;i<n-1;i++)
{
for(j=0;j<n-i-1;j++)
{
if(arr[j] >a[j+1])
{
temp=arr[j];
arr[j]=arr[j+1];
arr[j+1]=temp;
}
}
}
Is This Answer Correct ? | 15 Yes | 4 No |
Post New Answer View All Answers
What is a char in c?
How pointers are declared?
What is getch?
What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }
How variables are declared in c?
how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software
Why double pointer is used in c?
What is string concatenation in c?
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 “****”.
How macro execution is faster than function ?
Can you add pointers together? Why would you?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
Explain goto?
Write a program to know whether the input number is an armstrong number.