Save
Upgrade to remove ads
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

F2 ComProg

QuestionAnswer
How do you initialize an array in C+? int arr[3] = {1,2,3};
Which of the following accesses the seventh element stored in an array? array[6];
What is the output of the given code? #include <iostream> using namespace std; int main() { int a[3] = {10,12,14}; int i=0; while(i<3) { cout << a[i] << " "; i++; } } 10 12 14
What is the index number of the last element of an array with 20 elements? 19
What is the output of the following code? #include <iostream> using namespace std; int main() { char grade[] = {'A','B','C'}; cout << "GRADE = " << grade[0]; return 0; } GRADE = A
Which of the following best describes an array? Container of objects of similar types
What is the output of the program? #include <iostream> using namespace std; int main() { int myArray[] = {1,2,3,4,5,6}; for (int i = 0; i<6; i++) { cout << myArray[i] << " "; } } 1 2 3 4 5 6
Which of the following correctly declares an array? double prices[5];
Which of the following is NOT true? You can change the array size anytime.
What is the index number of the last element of an array with 50 elements? 49
If the array has a syntax of data_type array_name[x][y]; What does y represent? columns
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]
In order to have an array with 11 rows and 13 columns, the correct declaration should be: int x[11][13];
Which of the following is a two-dimensional array? int myArray [20][20];
In an array, int a[3][2], what is the last index value of the column? 1
In a given array int x[3][4] = {{0,1,2,3}, {4,5,6,7}, {8,9,10,11}}; how many rows are there? 3
Which of the following is a two-dimensional array? int myArray2D[8][24];
In a given array int x[3][4] = {{0,1,2,3}, {4,5,6,7}, {8,9,10,11}}; what is index of 5? x[1][1]
In the array is int x[3][4], how many columns were created? 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? array [1][2]
In a single dimension array, the starting index is always _____________. 0
What is the output of the following code? #include <iostream> using namespace std; int main() { double marks[3] = {90.5, 92.5, 96.5}; int a=0; while(a<3) { cout << marks[a] << " "; a++; 90.5 92.5 96.5
Which of the following statements is correct? double salary = balance[9];
Which of the following statements is correct? double average_grade = (quiz[0]+quiz[1]+quiz[2])/3;
Which of the following is correct about arrays? An array size cannot be changed once it is created To access the Nth element of an array students, used students[n-1] as the starting index is 0 All of the given Array element values can be changed any numbers of times
What are the data types of Arrays? char double All of stated data type int
An array starts with ___________ 0
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; } 1 5
In the array int x[2][5], how many rows were created? 2
In the array is int x[10][6], how many columns were created? 6
If you will be making a table of values, composed of 3 rows and 5 columns, what would be the array declaration? int a[3][5];
A two-dimensional array can be described as: A table of values ?
What is the output of the given program? #include <iostream> using namespace std; int main() { int a[2][2] = {{2,4},{6,8}}; int i, j; for (i = 0; i < 2; i++) for (j = 0; j < 2; j++) cout << a[i][j 2 4 6 8
An array composed of 6 rows and 2 columns, what would be the array declaration? int a[6][2];
In the array is int x[100][50], how many columns were created? 50
In a given array int x[3][4] = {{0,1,2,3}, {4,5,6,7}, {8,9,10,11}}; how many rows are there? 3
Created by: crystallll
 

 



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