assign elements of an array to a variable c++ code example Example: c++ initialize array int arr[3] = {1, 5, 4};