What kind of sorting is this?
SORT (k,n)
1.[Loop on I Index]
repeat thru step2 for i=1,2,........n-1

2.[For each pass,get small value]
min=i;
repeat for j=i+1 to N do
{
if K[j]<k[min]
min=j;
}
temp=K[i];K[i]=K[min];K[min]=temp;

3.[Sorted Values will be returned]
A)Bubble Sort
B)Quick Sort
C)Selection Sort
D)Merge Sort

Answers were Sorted based on User's Feedback



What kind of sorting is this? SORT (k,n) 1.[Loop on I Index] repeat thru step2 for i=1,2,..........

Answer / santhoo035

c

Is This Answer Correct ?    2 Yes 0 No

What kind of sorting is this? SORT (k,n) 1.[Loop on I Index] repeat thru step2 for i=1,2,..........

Answer / jitendra kumar arya

c)seletoin sort

Is This Answer Correct ?    2 Yes 0 No

What kind of sorting is this? SORT (k,n) 1.[Loop on I Index] repeat thru step2 for i=1,2,..........

Answer / subbu

answer is a

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More C Interview Questions

WAP to accept rollno,course name & marks of a student & display grade if total marks is above 200?

4 Answers  


Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)

2 Answers   HCL, IBM, Satyam, Vimal, Vimukti Technologies,


Why & is used in c?

0 Answers  


Explain void pointer?

0 Answers  


What is bubble sort in c?

0 Answers  


Write a program using bitwise operators to invert even bits of a given number.

2 Answers  


write a program for size of a data type without using sizeof() operator?

22 Answers   HCL, IBM,


Differentiate between static and dynamic modeling.

0 Answers   Wipro,


What happens if you free a pointer twice?

0 Answers  


What is memcpy() function?

0 Answers  


What is a program?

0 Answers  


what is the difference between entry control and exit control statement?

12 Answers   Darbari Lal DAV Model School,


Categories