This is how I would've implemented it with extensive use of the STL and C++11. It is a bit shorter than yours, but also more idiomatic. I've added comments throughout to help explain what each part does.
The main thing to note here is that you should return a container object instead of a pointer to a static C array. It's best not to mess with raw pointers in C++ when possible, especially when it makes more sense to return a container object itself. The compiler should be able to optimize this via Return Value Optimization (RVO) as well. This object should then not be static.
This does produce the same output as yours:
#include <algorithm> // std::reverse_copy()
#include <cstdint> // std::int32_t
#include <iostream>
#include <iterator> // std::ostream_iterator
#include <vector>
// you could use a typedef to save some typing
// also to give more meaning to your vector
typedef std::vector<int> SplitValues;
SplitValues splitter(std::int32_t number)
{
SplitValues values(8);
// work on vector elements using iterators
for (auto& iter : values)
{
iter = static_cast<int>(number & 0xF); // cast the C++ way
number >>= 4; // shorter form
}
return values;
}
int main()
{
std::int32_t number = 432214123;
// local vector assigned to one returned from function
SplitValues values = splitter(number);
// display vector in reverse order using ostream iterator
// this is done with one (wrapped) line and no loop
std::reverse_copy(values.begin(), values.end(),
std::ostream_iterator<int>(std::cout, " "));
}