How do you write a statement that declares a standard array of three *******s, initialized to 1, 2, and 4?
Printable View
How do you write a statement that declares a standard array of three *******s, initialized to 1, 2, and 4?
int arr[3]={1,2,4};
That's it.
Would you stop beating me to answers that I actually know. https://www.sharkyforums.com/images/.../2005/08/2.gifQuote:
Originally posted by driver:
int arr[3]={1,2,4};
That's it.
Great havin' you around, driver.
------------------
Dragon of the OC Crusaders
The race is not always to the swift, nor the battle to the strong, but that's the way to bet.
-- Damon Runyon
Just remember though that when accessing the array the locations starts at zero so arr[0] = 1, arr[1] = 2, and arr[2] = 4
sounds like assignment https://www.sharkyforums.com/images/.../2005/06/5.gif
------------------
Keep it brief