Froggy Jumps Variables and Arrays QuizVersion en ligne Test your knowledge on variables and arrays with this fun quiz! par Allie 1 What is a variable in programming? a A type of data structure. b A named memory location. c A function that returns values. 2 Which of the following is an array? a A collection of items stored at contiguous memory locations. b A single value holder. c A type of variable. 3 What does an 'index' refer to in arrays? a The position number of an element in an array b The contents an array contains c Adding or removing elements in an array 4 How do you declare an array in C++? a data_type array_name [number of elements]; b data_type array_name; c array_name {list of elements}; 5 What is the default value of an uninitialized variable in C++? a Always null. b Always zero. c What every was stored there last (garbage). 6 How do you access the first element of an array? a Using the index 0. b Using the index 1. c Using the index -1. 7 What is the purpose of a variable? a To define functions. b To create user interfaces. c To store data that can be changed during program execution. 8 What is an array's length? a The number of elements it contains. b The size of each element. c The type of data stored. 9 Which of the following is NOT a valid statement about arrays? a An array holds a collection of values, the data type doesn't matter b The last index in an array is the array's size - 1 c Once declared, an array's size cannot change