Um...that's some odd code you have there!
Start with your first method:
int my_array(int _array[],int size )
{
for(int i=0;i<size;i++)>
{
return _array[i];
}
}
It always returns the first element in the array, unless the size is negative, in which case it returns nothing at all. I'm surprised that compiles at all - it shouldn't on a modern compiler as there is a path such that the method does not return a value, and that is not allowed.
The second method:
swap(int i,int j,int k)
{
i=j;
i=k;
k=j;
}
Does nothing. Seriously, nothing at all. Values in C and C++ are passed by value, not by reference, which means that the function doesn't affect the world outside - the values inside the function are copies of the values outside, and any changes are not copied back. If they weren't, then you could call it like this:
swap(1, 2, 3)
And then what would happen?
In addition that isn't a "swap" function, so quite what you expect it to do I'm not sure...
Start by looking at those two and working out what you actually meant to do, and try to get it working: use the debugger to help you. It's a wonderful tool that lets you see and control exactly what is happening while your code is running. Get to know it - it'll save you some serious head scratching later! And until you get them working, the rest of the code is pretty useless! When they work, you can use the debugger to work out what is wrong with the rest.