What are the average number of comparisons required to sort
3 elements?
Answers were Sorted based on User's Feedback
Answer / jaiprakash
n(n-1)/2(bubble sort)
n=3
(3*2)/2=3(n)
ans:n
| Is This Answer Correct ? | 13 Yes | 1 No |
write a program in c language that uses function to locate and return the smallest and largest integers in an array,number and their position in the array. it should also find and return the range of the numbers , that is , the difference between the largest number and the smallest.
what is use of loop?
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
print out put like this form 1 2 3 4 5 6 3 5 7 9 11 8 12 16 20
write a program that uses point of sale system. which are mainly used by retail markets, where the is a database inventory list, a slip should be printed for the customer. manage should be able to access what has been sold and what is left from stock?
what is the difference between while and do while?
Why do we need functions in c?
Write a main() program that calls this function at least 10 times. Try implementing this function in two different ways. First, use an external variable to store the count. Second, use a local variable. Which is more appropriate?
How to add two numbers with using function?
in C-programming language without using printf statement can we get output r not ? if yes how and if no also how ?
n=7623 { temp=n/10; result=temp*10+ result; n=n/10 }
what is the little endian and big endian?