variance of a portfolio with n assets

how to initialize a char array in c++