diff --git a/cpp/loop_array.cpp b/cpp/loop_array.cpp new file mode 100644 index 0000000..9c4e217 --- /dev/null +++ b/cpp/loop_array.cpp @@ -0,0 +1,17 @@ +#include +using namespace std; +void printArray(int arr[5]); +int main() +{ + int arr1[5] = { 10, 20, 30, 40, 50 }; + printArray(arr1); + printArray(arr2); +} +void printArray(int arr[5]) +{ + cout << "Printing array elements:"<< endl; + for (int i = 0; i < 5; i++) + { + cout<