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

More C Interview Questions

what is output of the following statetment?Printf(“%x”, -1<<4); ?

How do I initialize a pointer to a function?

c program to compute Income tax and Net Salary for its employees. The company offers tax relief of Kshs. 650 for single employees and Kshs. 1,100 for married employees. The relief will be deducted from the Gross salary, to give the taxable income. This will be computed at the following rates: [10mks] Taxable Income Rate (%) <5000 0 5000-19999 6 20000-36999 9 37000 and above 16

Write code for initializing one dimentional and two dimentional array in a C Program?

2. Write a function called hms_to_secs() that takes three int values&#8212;for hours, minutes, and seconds&#8212;as arguments, and returns the equivalent time in seconds.. Create a program that exercises this function by repeatedly obtaining a time value in hours, minutes, and seconds from the user (format 12:59:59), calling the function, and displaying the value of seconds it returns.

How will you print TATA alone from TATA POWER using string copy and concate commands in C?

Write a program to add a given duration with time(24hrs format)

Given an array A[n+m] of n+m numbers, where A ... A[n] is sorted and A[n+1] ... A[n+m] is sorted. Design a linear time algorithm to obtain A[1...n+m] sorted using only O(1) extra space. Time Complexity of your algorithm should be O(n) and Space Complexity O(1).

1.what are local and global variables? 2.what is the scope of static variables? 3.what is the difference between static and global variables? 4.what are volatile variables? 5.what is the use of 'auto' keyword? 6.how do we make a global variable accessible across files? Explain the extern keyword? 7.what is a function prototype? 8.what does keyword 'extern' mean in a function declaration?

Explain a file operation in C with an example.

64/square(4)

write a c prog for removing duplicate character from an array and sorting remaining elements using a single array

Categories
• C (2996)
• C++ (1626)
• VC++ (374)
• Delphi (543)
• Python Related (761)
• PHP Related (1267)
• Scala (136)
• R Programming (312)
• Kotlin (157)
• Apache Groovy (22)
• Ruby (104)
• Programming Languages AllOther (735)