tag:blogger.com,1999:blog-959939550345671470.post7204642680629959538..comments2024-03-24T12:51:18.535+05:30Comments on C programming Interview questions and answers: QUICK SORT USING C PROGRAMPriyanka kumarihttp://www.blogger.com/profile/08145649011863585828noreply@blogger.comBlogger69125tag:blogger.com,1999:blog-959939550345671470.post-54133912278385453012024-01-31T16:45:39.502+05:302024-01-31T16:45:39.502+05:30I have viewed following page on Wed 31-Jan-2024 IS...I have viewed following page on Wed 31-Jan-2024 IST<br />https://www.cquestions.com/2008/01/c-program-for-quick-sort.html<br />We can replace temporary variable using XOR operator to swap values:<br /> temp=x[pivot];<br /> x[pivot]=x[j];<br /> x[j]=temp;<br />with:<br /> if ( j != pivot )<br /> {<br /> arr[pivot] ^= arr[j];<br />murugesan opensslhttps://www.blogger.com/profile/10456790198322490413noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-85576205745099597912016-07-21T12:34:50.474+05:302016-07-21T12:34:50.474+05:30i want the program code for quick sort without usi...i want the program code for quick sort without usinf function or recursion.i want function code of quick sort only in main function plzzzz any one can help me.Anonymoushttps://www.blogger.com/profile/03305846030863890080noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-26830151289322409262016-06-24T11:05:12.197+05:302016-06-24T11:05:12.197+05:30thank you dude, JesusQuickthank you dude, JesusQuick:Dhttps://www.blogger.com/profile/10168480620919924336noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-47771815586772340352016-06-05T20:34:06.158+05:302016-06-05T20:34:06.158+05:30Incorrect code ! Used cin function on c language Incorrect code ! Used cin function on c language Anonymoushttps://www.blogger.com/profile/04618992862795854907noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-5810718843891774842016-04-17T12:18:04.338+05:302016-04-17T12:18:04.338+05:30//i can not find my mistake...pls any one help me....//i can not find my mistake...pls any one help me...according to me there is no logical problem...bt something may me wrong in my program...pls pls help me//<br /><br />#include<br />void quick(int [15],int,int);<br />void main()<br />{<br />int array[15],i,n;<br />printf("Enter no of elements to sort:\n");<br />scanf("%d",&n);<br />printf("Enter %d elements 1 by 1:\nAnonymoushttps://www.blogger.com/profile/05600557807128825355noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-56194849242718866332016-04-17T12:17:41.896+05:302016-04-17T12:17:41.896+05:30//i can not find my mistake...pls any one help me....//i can not find my mistake...pls any one help me...according to me there is no logical problem...bt something may me wrong in my program...pls pls help me//<br /><br />#include<br />void quick(int [15],int,int);<br />void main()<br />{<br />int array[15],i,n;<br />printf("Enter no of elements to sort:\n");<br />scanf("%d",&n);<br />printf("Enter %d elements 1 by 1:\nAnonymoushttps://www.blogger.com/profile/05600557807128825355noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-18816751167451386932016-04-17T12:05:19.921+05:302016-04-17T12:05:19.921+05:30This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/05600557807128825355noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-80826433659383568112016-03-15T20:53:57.740+05:302016-03-15T20:53:57.740+05:30If you want to sort each city individually thantha...If you want to sort each city individually thanthan apply a sorting algorithm on each individual array. If you want to sort d full array than your better off copying the whole in another array, sorting it n copying d contents back. Anonymoushttps://www.blogger.com/profile/09938392025776689384noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-30640974100965458762016-02-06T12:56:57.789+05:302016-02-06T12:56:57.789+05:30//plz check my mistake in this quick sort program....//plz check my mistake in this quick sort program. i am not getting output<br />#include <br />int partition(int [],int ,int );<br />void qs(int [],int ,int );<br />int partition(int a[],int p,int r)<br />{ <br /> int i,j, t,x,temp;<br /> x=a[r-1];<br /> i=p-1;<br /> printf("sid");<br /> for(j=p;j<r-1;j++)<br /> {<br /> if(a[j]<=x)<br /> {<br /> i=i+1;<br /> t=a[j];<br /> Anonymoushttps://www.blogger.com/profile/12444566408011796072noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-63034654135155266062015-11-18T07:19:32.824+05:302015-11-18T07:19:32.824+05:30This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/00389760430787899377noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-36713902552821385712015-10-15T16:51:54.731+05:302015-10-15T16:51:54.731+05:30Please write finished work qsort..Please write finished work qsort..Bobohttps://www.blogger.com/profile/03917938208148417077noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-46609238800966086492015-09-28T22:45:51.058+05:302015-09-28T22:45:51.058+05:30why to use c
why to use c<br /><br /><br /><br /><br />Anonymoushttps://www.blogger.com/profile/04113102057669360167noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-11705557371243394162015-09-23T02:40:36.992+05:302015-09-23T02:40:36.992+05:30plz tell me abt these two lines in brief...
...plz tell me abt these two lines in brief...<br /> quicksort(x,first,j-1);<br /> quicksort(x,j+1,last);Anonymoushttps://www.blogger.com/profile/08650972876130176206noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-63072172224574912602015-09-11T22:11:04.568+05:302015-09-11T22:11:04.568+05:30what other modification in the code would I need t...what other modification in the code would I need to make if i initialise 'pivot=a[first]' (as the element itself)<br />rather tha 'pivot=first'(which sets the index value to pivot)GunnerUjjwolhttps://www.blogger.com/profile/10400765001199474164noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-87537413419951096272015-09-01T20:33:49.684+05:302015-09-01T20:33:49.684+05:30not understandnot understandAnonymoushttps://www.blogger.com/profile/16191780038816331914noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-63852134074262613962015-08-05T22:10:29.554+05:302015-08-05T22:10:29.554+05:30Go to option then directories and remove include a...Go to option then directories and remove include and lib from last that's it<br /><br />Anonymoushttps://www.blogger.com/profile/02290239482644364687noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-52487863806518169202015-07-10T19:59:01.472+05:302015-07-10T19:59:01.472+05:30#include
#include
void quicksort(int [],int,int);
...#include<br />#include<br />void quicksort(int [],int,int);<br />int main()<br />{<br />int x[20],size,i;<br /><br />printf("Enter size of the array [<20]: ");<br />scanf("%d",&size);<br />printf("Enter %d elements: ",size);<br />for(i=0;i<size;i++)<br />{<br /> scanf("%d",&x[i]);<br />}<br /><br />quicksort(x,0,size-1);<br />printf("tamashahttps://www.blogger.com/profile/07093407733095635635noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-87191043835081937542015-05-07T12:11:55.197+05:302015-05-07T12:11:55.197+05:30 Obtain the passenger details for a railway reserv... Obtain the passenger details for a railway reservation system. Sort the passenger records based on train number and destination city using quick sort. Chandanhttps://www.blogger.com/profile/13932084177744856066noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-67209508922328621462015-02-06T07:36:22.373+05:302015-02-06T07:36:22.373+05:30I need your Help someone.I need your Help someone.Anonymoushttps://www.blogger.com/profile/15954691295438195552noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-5946144617600122462015-02-06T07:35:40.117+05:302015-02-06T07:35:40.117+05:30How to make source code of simple quick sort imple...How to make source code of simple quick sort implementation using array descending order in c programming language?<br />Anonymoushttps://www.blogger.com/profile/15954691295438195552noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-37363097211469178182015-01-24T09:45:30.434+05:302015-01-24T09:45:30.434+05:30This program works in recursive manner. At first y...This program works in recursive manner. At first you need to know how recursive function worksAnonymoushttps://www.blogger.com/profile/17446414341716951271noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-44717670416414554202014-12-17T12:48:27.466+05:302014-12-17T12:48:27.466+05:30how to run bubble sort program in c++? i need the ...how to run bubble sort program in c++? i need the exact code of the program.Anonymoushttps://www.blogger.com/profile/09106324990658315904noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-30965220383015051642014-11-10T23:33:05.172+05:302014-11-10T23:33:05.172+05:30An arrow in the eyeAn arrow in the eyeAnonymoushttps://www.blogger.com/profile/07581304290451819137noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-56939883087421266682014-10-13T19:05:55.776+05:302014-10-13T19:05:55.776+05:30can anyone explain the quick sort program which is...can anyone explain the quick sort program which is given above plzzAnonymoushttps://www.blogger.com/profile/13127694019104366157noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-77892480591776533572014-05-23T15:31:45.979+05:302014-05-23T15:31:45.979+05:30buddy..msg me at anand.sinha85@gmail.com for any h...buddy..msg me at anand.sinha85@gmail.com for any help on sorting(The guy who posted it as final year project).Although the project is one of the easiest you can get stil if you need any help kindly let me know.Anonymousnoreply@blogger.com