CSC126_Quiz9_Chapter6

CSC126_Quiz9_Chapter6

University

15 Qs

quiz-placeholder

Similar activities

BCSC0006 - Quiz 2 - Big-Oh Notation

BCSC0006 - Quiz 2 - Big-Oh Notation

University

10 Qs

reFRESHIEr ICS2602 Quiz

reFRESHIEr ICS2602 Quiz

University

10 Qs

Arrays in C (II yr 02.07.2020)

Arrays in C (II yr 02.07.2020)

University

10 Qs

OOP - Java Classes

OOP - Java Classes

12th Grade - University

15 Qs

Linked List

Linked List

University

14 Qs

C Program Array and strings

C Program Array and strings

University

10 Qs

Array

Array

University

18 Qs

Structure Data Review

Structure Data Review

University - Professional Development

10 Qs

CSC126_Quiz9_Chapter6

CSC126_Quiz9_Chapter6

Assessment

Quiz

Computers

University

Hard

Created by

TS ZAKARIA

FREE Resource

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];

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?