MCPcopy Create free account
hub / github.com/ShiqiYu/CPP / main

Function main

week04/examples/array.cpp:3–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include <iostream>
2using namespace std;
3int main()
4{
5 int num_array1[5]; //uninitialized array, random values
6 int num_array2[5] = {0, 1, 2, 3, 4}; //initialization
7
8 for(int idx = 0; idx < 5; idx++)
9 cout << num_array1[idx] << " ";
10 cout << endl;
11
12 for(int idx = 0; idx < 5; idx++)
13 cout << num_array2[idx] << " ";
14 cout << endl;
15
16 return 0;
17}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected