Just For Fun Quiz / 1D Arrays

Random Just For Fun Quiz

How much do you know about 1D arrays?

Quiz not verified by Sporcle

How to PlayForced Order
Challenge
Share
Tweet
Embed
Score 0/16 Timer 10:00
HintAnswer
Declaration of an array called nums that contains int elements:
Initialize nums to have 10 elements
How do you find how many elements are in nums?
Make the first element in nums equal to 5
Use an initializer list to make a new array of the first 5 positive even integers called evens.
What is each position in an array called?
System.out.println(nums[7]); returns
System.out.println(nums[10]); returns
HintAnswer
nums = evens; creates a __ to evens
System.out.println(nums[0]); returns
Arrays length is said to be
For an array of objects, calling an index without an element in it will return the exception
Write an for each header to traverse through nums, using variable d
Arrays must store data of the ___ type
An array is stored as a __ reference to represent multiple objects
If I have an array called cage of Dog objects, how can I make cage[0] reference the object at cage[2]?

You're not logged in!

Compare scores with friends on all Sporcle quizzes.
Sign Up with Email
OR
Log In

You Might Also Like...

Show Comments

Extras

Top Quizzes Today


Score Distribution

Your Account Isn't Verified!

In order to create a playlist on Sporcle, you need to verify the email address you used during registration. Go to your Sporcle Settings to finish the process.