Write a c++
program which performs the following tasks:
a) Initialize an integer array of 10 elements in main( )
b) Pass the entire array to a function modify( )
c) In modify( ) multiply each element of array by 3
d) And display each element of array
Answers
Answered by
1
Answer:
please mark me as brain list
Initializing an Array in C++
You can also initialize an array when you declare it by including the initial values in braces after the declaration. For a small array, this is easy: int nCount[5] = {0, 1, 2, 3, 4}; Here the value of nCount[0] is initialized to 0, nCount[1] to 1, nCount[2] to 2, and so on.
Similar questions