Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 06 / printArray.cpp
blob: af69b418cc797bf60aed7e77bd5e8753d03141fd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>
using namespace std;


void print(const int arr[], unsigned int len)
{
	cout << "[ ";
	for (int i = 0; i < len; i++)
		cout << arr[i] << " ";
	cout << "]" << endl;
}

int main()
{
	int arr[]  { 1, 2, 3, 4, 5, 6, 7, 8};
	print(arr, 8);
}