Electrical and Computer Engineering
6 of 17
UAH
CPE 112
More About Arrays
•Arrays can be initialized in their declarations.
–Example: int age[5] = {23, 10, 16, 37, 12};
•C++ does not allow aggregate operations on arrays. To copy one array into another, you must do it yourself, element by element. You also may not do an aggregate comparison of arrays. It’s not possible to return an entire array as the value of a value-returning function. You can pass an entire array as an argument to a function.