Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions array/ex1/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Simple program using a fixed-sized C++ array.
*
*
* @author
* Wade Fagen-Ulmschneider <waf@illinois.edu>
*/
Expand All @@ -9,8 +9,8 @@

int main() {
// Create a fixed-sized array of 10 primes:
int values[10] = { 2, 3, 5, 7, 11, 13, 15, 17, 21, 23 };
int values[10] = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29 };

// Outputs the 4th (index 3) prime:
std::cout << values[3] << std::endl;

Expand Down
6 changes: 3 additions & 3 deletions array/ex2/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Calculating the memory seperation of elements in an array.
*
*
* @author
* Wade Fagen-Ulmschneider <waf@illinois.edu>
*/
Expand All @@ -9,8 +9,8 @@

int main() {
// Create an array of 10 primes:
int values[10] = { 2, 3, 5, 7, 11, 13, 15, 17, 21, 23 };
int values[10] = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29 };

// Print the size of each type `int`:
std::cout << sizeof(int) << std::endl;

Expand Down