It is well defined C++ to pass std::vector to C APIs that expect an output array like so because std::vector is contiguous:
std::vector myArray(a
Yes, but you'll need to pass them using the c_str method to guarantee null-termination.