Re: [algogeeks] GATE C-Question

2011-07-27 Thread Vijay Khandar
Thanku Sasi . On Tue, Jul 26, 2011 at 10:49 PM, sasi kumar wrote: > hi > > void XYZ(int a[],int b[], int c[]) > > { > > int i,j,k; > > i=j=k=0; > > while((i > { > > if (a[i] > c[k++]=a[i++]; > > else > > c[k++]=b[j++]; > >0 > > } > > In this case either i value or j value is

Re: [algogeeks] GATE C-Question

2011-07-26 Thread sasi kumar
hi > void XYZ(int a[],int b[], int c[]) > { > int i,j,k; > i=j=k=0; > while((i { > if (a[i]  c[k++]=a[i++]; >  else >  c[k++]=b[j++]; >0 > } In this case either i value or j value is incremented at a time in an iteration . So its impossible that both the conditions (i< n) and (j > Which of

[algogeeks] GATE C-Question

2011-07-26 Thread Vijay Khandar
Consider the following C-function in which a[n] and b[m] are two sorted integer arrays and c[n+m] be an other integer array. void XYZ(int a[],int b[], int c[]) { int i,j,k; i=j=k=0; while((ihttp://groups.google.com/group/algogeeks?hl=en.

Re: [algogeeks] GATE C-Question

2011-07-26 Thread rajeev bharshetty
C ) On Tue, Jul 26, 2011 at 9:02 PM, Vijay Khandar wrote: > Consider the following C-function in which a[n] and b[m] are two > sorted integer arrays and c[n+m] be an other integer array. > > > void XYZ(int a[],int b[], int c[]) > { > int i,j,k; > i=j=k=0; > while((i { > if (a[i] c[k++]=a[i++]; >

[algogeeks] GATE C-Question

2011-07-26 Thread Vijay Khandar
Consider the following C-function in which a[n] and b[m] are two sorted integer arrays and c[n+m] be an other integer array. void XYZ(int a[],int b[], int c[]) { int i,j,k; i=j=k=0; while((ihttp://groups.google.com/group/algogeeks?hl=en.