how to array in c++ code example Example 1: initialize array c++ int foo [5]; Example 2: how to array in c++ int foo [5] = { 16, 2, 77, 40, 12071 };