Save
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

CP2-Module 2

Arrays: Single Dimensional and Two Dimensional

QuestionAnswer
Which of the following statements is correct? double salary = balance(9); double salary = balance[9]: double salary : balance(9); double salary = balance[9]; double salary = balance[9];
A series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier. Index Array Parameter Identifier Array
In C++, an Array is: All of the given Array elements are stored in memory in continuous or contiguous locations An array contains more than one element A group of elements of the same type All of the given choices.
What is the index number of the last element of an array with 20 elements? 18 0 20 19 19
Which of the following gives the memory address of the first element in an array? array[1]; array(2); array a. array[one]; array
Which of the following is NOT correct? int arr1[5]; Int arr1[5]; int arr1[] = {3,56,32,23,45}; int arr1[5] = {3,56,32,23,45}; Int arr1[5];
If an array can store 10 values, what would be its last index? 9 11 8 10 9
What are the data types of Arrays? int double char All of stated data type All of stated data type
What is the output of the following code? #include <iostream> using namespace std; int main() { int a[] = {1,2,3,4}; int b[] = {5,6,7,8}; cout << a[0] << " " << b[0]; return 0; } Group of answer choices 1 5 1 5
What would be the output of the following code? #include <iostream> using namespace std; int main() { int myArray[] = {10,12,14,5,4}; int i=0; while(i<3) { cout << myArray[i] << " "; i++; 10 12 14
Check the array below: int array[3][5] { { 1, 2, 3, 4, 5 }, { 6, 7, 8, 9, 10 }, { 11, 12, 13, 14, 15 } }; What’s the index of the array where it contains the value 10? array [1][4]
Which of the following is a two-dimensional array? int myArray2D[8][24]; int myArray2D[] = {8,24}; int myArray2D; int myArray2D(int x, int y) int myArray2D[8][24];
What is the output of the following program? #include <iostream> using namespace std; int main () { int a[3][2] = { {0,0}, {1,2}, {2,4} }; for ( int i = 0; i < 3; i++ ) for ( int j = 0; j < 2; j++ ) { cout << a[ 0 0 1 2 2 4
Check the array below: int array[3][5] { { 1, 2, 3, 4, 5 }, { 6, 7, 8, 9, 10 }, { 11, 12, 13, 14, 15 } }; What’s the index of the array where it contains the value 8? Group of answer choices array[1][1] array [1][2]
What is the index number of the last element of an array with 15 elements? 0 14 9 15 14
Which of the following is a two-dimensional array? char array[20]; int myArray [20][20]; array myArray [20][20]; int myArray[20]; int myArray [20][20];
In the array is int arr[11][5], how many rows were created? 10 9 5 11 11
If you are going to create a 10x10 array named myTable, what would be your declaration? int myTable[10][10]; int myTables [10][10]; int myTable[] = {10,10}; Int myTable[10][10]; int myTable[10][10];
In order to have an array with 5 rows and 10 columns, the correct declaration should be: int x[]={5,10}; int x[10][5]; int x(10)(5); int x[5][10]; int x[5][10];
In order to have an array with 50 rows and 2 columns, the correct declaration should be: Group of answer choices int x[50][2]; int x[2][50]; int x[]={50,2}; int x[50]; int x[50][2];
Created by: Easy Kwatro
Popular Computers sets

 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards