Search Header Logo

AP Computer Science A Quiz

Computers

12th Grade

Used 278+ times

AP Computer Science A Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

_________________ is a collection of elements used to store the same type of data.

Array
Switch
Case
Loop

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

For the array:
float stats[3];
What is the range of the index?

0 to 3
0 to 2
1 to 3
0 to 4

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

int nums[ ] =
{2, 3, 5, 8, 9, 11};
How would you access the fourth element in nums

nums[4]
nums[3]
nums(4)
nums(3)

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

for(int i=0; i<10; i++)
           numbers[i] = 2 * i + 1;
// Which index of the array holds the value of 5?

1
2
3
4

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Examine the following:
int items[ ][ ] = 
{ {0,1,3,4} , {4,3,99,0,7} , {3,2} } ;
Which of the following statements replaces the 99 with 77?

items[1][2] = 77;
items[2][1] = 77;
items[ 99 ] = 77;
items[2][3] = 77;

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Examine the following:
float values[ ][ ] = 
{ {1.2, 9.0, 3.2},  
               {9.2, 0.5, 1.5, -1.2},  
      {7.3, 7.9, 4.8} } ;
what is in values[3][0]?

7.3
7.9
9.2
There is no such array element.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

 Which of the following is a two-dimensional array?

array anarray[20][20];
int anarray[20][20];
int array[20, 20];
char array[20];

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?