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

Write the program for displaying the ten most frequent words in a file such that your program should be efficient in all complexity measures.

3 Answers   Google,


Write a C program to perform some of the operation which can be performed using Single linked list

1 Answers   Qualcomm,


Implement a function that returns the 5th element from the end in a singly linked list of integers in one pass.

11 Answers   Microsoft,


What is the difference between static and global variables?

1 Answers  


What is header file in c?

0 Answers  






What are the different types of errors?

0 Answers  


What is c token?

0 Answers  


WAP to accept basic salary of an employee? Calculate it HRA=25%,DA=30%,PF=30%&net salary display all contents?

6 Answers   Finite Infotech, Lovely Professional University, Wipro,


What are the modifiers available in c programming language?

0 Answers  


Badboy is defined who has ALL the following properties: Does not have a girlfriend and is not married. He is not more than 23 years old. The middle name should be "Singh" The last name should have more than 4 characters. The character 'a' should appear in the last name at least two times. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers

0 Answers  


Why is c called c?

0 Answers  


what is the output of below code int x=8,y; x>>=2; y=x; what is y value. NOTE:EXPLANATION IS COMPALSARY with binary bits

2 Answers   Wipro,


Categories