C++ Arrays Quiz

C++ Arrays Quiz

9th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

Big Data Strategies

Big Data Strategies

7th Grade - Professional Development

10 Qs

Conceptos

Conceptos

10th Grade

11 Qs

Preventive Medicine

Preventive Medicine

12th Grade

11 Qs

แบบทดสอบหน่วยที่ 2 สร้างสรรค์ผลงานด้วยภาษาไพทอน

แบบทดสอบหน่วยที่ 2 สร้างสรรค์ผลงานด้วยภาษาไพทอน

9th Grade

10 Qs

mat=math=math

mat=math=math

KG - 11th Grade

15 Qs

Levels of Ecological Organization  pp 60-61

Levels of Ecological Organization pp 60-61

11th - 12th Grade

10 Qs

AP Bio Macromolecule Quiz

AP Bio Macromolecule Quiz

11th - 12th Grade

10 Qs

Drugs and Toxicology Vocab Review

Drugs and Toxicology Vocab Review

12th Grade

15 Qs

C++ Arrays Quiz

C++ Arrays Quiz

Assessment

Quiz

Science

9th - 12th Grade

Medium

Created by

Fidaa Abed

Used 4+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an array in C++?

A collection of variables with different types

A class with multiple constructors

A variable that can store multiple values of the same type

A type of loop

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following declaration do? int tests[5];

Creates 6 integer variables

Allocates memory for 5 integers

Creates 5 functions

Declares 5 arrays

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the subscript of the first element in an array?

1

-1

0

Depends on the compiler

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How much memory does int tests[5]; use if each int takes 4 bytes?

5 bytes

10 bytes

20 bytes

25 bytes

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement accesses the third element in int tests[5];?

tests(2)

tests[3]

tests[2]

tests.3

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is true about the size declarator in an array?

It must be a float

It specifies the number of characters

It shows how many elements the array can hold

It cannot be a constant

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid array declaration using a constant?

const int SIZE = 5; int data(SIZE);

int SIZE = 5; data[SIZE];

const int SIZE = 5; int data[SIZE];

int data[];

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?