5. 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



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

Answer / murali

Bubble sort

Is This Answer Correct ?    5 Yes 2 No

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

Answer / rajesh

Selection Sort

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More C Interview Questions

What are the scope of static variables?

0 Answers  


What is bin sh c?

0 Answers  


any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above

0 Answers  


What is keyword with example?

0 Answers  


When is an interface "good"?

1 Answers  






what is the use of #pragma pack, wer it is used?

2 Answers   Wipro,


compute the nth mumber in the fibonacci sequence?

10 Answers   Canon, HPL, Satyam, TCS,


How can I get Single byte from 'int' type variable? Can we alter single bit or multiple bits in int type variable? if so, How?

2 Answers  


what will happen if you free a pointer twice after allocating memory dynamically ?

3 Answers   Novell,


2)#include<iostream.h> main() { printf("Hello World"); } the program prints Hello World without changing main() the o/p should be intialisation Hello World Desruct the changes should be a)iostream operator<<(iostream os, char*s) os<<'intialisation'<<(Hello World)<<Destruct b) c) d)none of the above

4 Answers   Siemens,


Write a c program using for loop to print typical pattern if number of rows is entered by keyboard. ABCBA AB BA A A

1 Answers  


write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...

0 Answers  


Categories