If you mean you want no intermediate data, you may want to sort during the merge.
Before I continue I'd like to point out that you aren't actually merging your arrays, in the code you posted. You're overwriting one.
You're also incrementing i twice. Edit: I actually have no idea what you're doing with those 2 while loops, sorry. Also please use code tags.
If you don't care about the speed of sorting, you can use this method to swap the data of two variables without creating an intermediary variable:
if( a[19] < a[18] ) {
a[19] ^= a[18];
a[18] ^= a[19];
a[19] ^= a[18];
}
I don't know why you would necessarily want to do this.
You would simply need to iterate backward through your array until the if statement does not pass for a single element, you could use a size 1 smaller each time, in the worst case scenario (i<20) -> (i<19) -> (i<18)
There are better ways to sort, but that's not necessarily in the scope of this explanation.