How does selection sort work in c?



How does selection sort work in c?..

Answer / Akhilesh Saraswat

"Selection Sort is a simple sorting algorithm that works by repeatedly finding the minimum element from the unsorted part of the array and putting it at the beginning. Here's a simple implementation in C:"

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

print 1-50 with two loop & two print Statement

2 Answers  


#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }

1 Answers   Wilco,


Write a program of advanced Fibonacci series.

1 Answers   Aspiring Minds,


write a c program to print the values in words eg:- 143 written it has (one hundred and forty three)& 104, 114 are also written words

5 Answers   Captronic, DELL, Google, IBM, Mithi, RCC, Wipro,


Differentiate between a for loop and a while loop? What are it uses?

1 Answers   TISL,


how the size of an integer is decided? - is it based on processor or compiler or OS?

19 Answers   HCL, JPR, Microsoft, nvidia,


How would you use the functions fseek(), freed(), fwrite() and ftell()?

1 Answers   Aspire, Infogain, TISL,


The statement, int(*x[]) () what does in indicate?

1 Answers  


how to swap two integers 1 and 32767 without using third variable

11 Answers   Microsoft, TCS,


Explain what is a 'locale'?

1 Answers  


Is c compiled or interpreted?

1 Answers  


differnce between do and do while

3 Answers   DOEACC,


Categories