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
Answer Posted / rajesh
Selection Sort
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What will be the outcome of the following conditional statement if the value of variable s is 10?
What is c programming structure?
Can include files be nested? How many levels deep can include files be nested?
Why can arithmetic operations not be performed on void pointers?
How will you print TATA alone from TATA POWER using string copy and concate commands in C?
When a c file is executed there are many files that are automatically opened what are they files?
Write a program with dynamically allocation of variable.
What is function prototype?
Explain what are its uses in c programming?
What is the auto keyword good for?
WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER
Why is c faster?
How can I implement sets or arrays of bits?
write an interactive C program that will encode or decode a line of text.To encode a line of text,proceed as follows. 1.convert each character,including blank spaces,to its ASCII equivalent. 2.Generate a positive random integer.add this integer to the ASCII equivalent of each character.The same random integer will be used for the entire line of text. 3.Suppose that N1 represents the lowest permissible value in the ASCII code,and N2 represents the highest permissible value.If the number obtained in step 2 above(i.e.,the original ASCII equivalent plus the random integer)exceeds N2,then subtract the largest possible multiple of N2 from this number,and add the remainder to N1.Hence the encoded number will always fall between N1 and N2,and will therefore always represent some ASCII character. 4.Dislay the characters that correspond to the encoded ASCII values. The procedure is reversed when decoding a line of text.Be certain,however,that the same random number is used in decodingas was used in encoding.
What are the 4 data types?