initialize empty array cpp code example Example 1: c++ initialise array int nCount[] = {1, 2, 3, 4, 5}; Example 2: c++ initialize array int arr[3] = {1, 5, 4};