initializing all elements of array c++ code example Example: c++ initialise array int nCount[] = {1, 2, 3, 4, 5};