Search Header Logo

Arrays Intro

Authored by DVHSAPCS undefined

Computers

9th - 12th Grade

Used 87+ times

Arrays Intro
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which declaration creates an array that holds 5 ints?

int[5] hand = new int[5];
int[5] hand = new int[];
int[] hand = new int[5];
int hand = new int[5];

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

For the array:
double[] stats = new double[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

//Which array will win?
string status = "Win";  
if(player[3] == 4)          
  status = "lose";
if(player[1] == 3)            
  status = "lose";
if(player[2] == 2)            
  status = "lose";

{0,1,2,3}
{1,3,2,4}
{3,2,1,4}
{3,2,4,5}

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

//Which array will lose?
string status = "Win";
if(player[3] == 4)          
  status = "lose";
if(player[1] == 3)          
  status = "lose";
if(player[2] == 2)          
  status = "lose";

{3,2,4,1}
{1,2,3,4}
{1,2,4,3}
{3,4,1,2}

5.

MULTIPLE CHOICE QUESTION

30 sec • 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

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

for(int i=0;i<10;i++)

deck[2*i] = 5;

// Which statement will not print out 5?

Console.WriteLine(deck[18]);

Console.WriteLine(deck[0]);

Console.WriteLine(deck[10]);

Console.WriteLine(deck[20]);

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

for(int i = 1; i<=100; i++)

numbers[i-1] = i/10;

//At what index will the first 2 occur?

1

2

19

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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?