CSC126_Quiz9_Chapter6

CSC126_Quiz9_Chapter6

University

15 Qs

quiz-placeholder

Similar activities

CHAPTER 1: COMPUTER SECURITY REVIEW

CHAPTER 1: COMPUTER SECURITY REVIEW

University

10 Qs

1-基本数据类型

1-基本数据类型

University

10 Qs

Chap 1: What is a program made of?

Chap 1: What is a program made of?

University

13 Qs

Basic on Operating System

Basic on Operating System

University

10 Qs

cp06-01-1D-Array

cp06-01-1D-Array

University

10 Qs

DreamWeaver CS6

DreamWeaver CS6

University

20 Qs

Kuis Dadakan ;)

Kuis Dadakan ;)

10th Grade - University

15 Qs

Topic 4-2: Multiple if-else and switch-case

Topic 4-2: Multiple if-else and switch-case

University

10 Qs

CSC126_Quiz9_Chapter6

CSC126_Quiz9_Chapter6

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

TS ZAKARIA

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an array in C++?

A list of functions

A collection of variables of different types

A fixed-size collection of variables of the same type

A dynamic list of classes

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

1

-1

0

Depends on the compiler

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a correct array declaration?

int nums();

array int[10];

int nums[10];

int nums{};

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of cout << max[0]; if int max[5] = {10, 3, 2, 40, 1};?

3

0

10

1

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to declare an array of characters in C++?

string

str

text

char

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if the number of elements is less than the array size during initialization?

Compilation error

Remaining elements are garbage values

Remaining elements are filled with zeros

Only the specified elements are used

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an illegal declaration?

int arr[3] = {1, 2, 3, 4};

int arr[ ] = {5, 6, 7};

int arr[4] = {1, 2};

int arr[5];

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?