Saturday 12 March 2016

Declare an array of five ints and initialize it to the first five odd positive integers.

Leave a Comment

Question:

Declare an array of five ints and initialize it to the first five odd positive integers.

Answer:

int oddly[5] = {1, 3, 5, 7, 9};

Source:

C++ Primer Plus Sixth Edition Chapter Review

If You Enjoyed This, Take 5 Seconds To Share It

0 Questions: