C++ Basics for First Semester Students

C++ Basics for First Semester Students

1st Grade

15 Qs

quiz-placeholder

Similar activities

Python Quiz

Python Quiz

1st - 5th Grade

17 Qs

Tipos Agregados Homogêneos - Vetor e Matriz em C

Tipos Agregados Homogêneos - Vetor e Matriz em C

1st - 10th Grade

20 Qs

X-Tech Riot (2)

X-Tech Riot (2)

1st Grade

20 Qs

Arrays

Arrays

KG - University

10 Qs

Season 5 #Spaic Python Weekly Quiz

Season 5 #Spaic Python Weekly Quiz

KG - Professional Development

20 Qs

Competitive Programming

Competitive Programming

1st Grade

10 Qs

Программирование C#

Программирование C#

1st - 10th Grade

10 Qs

Q3 ADT ArrayList

Q3 ADT ArrayList

1st Grade

10 Qs

C++ Basics for First Semester Students

C++ Basics for First Semester Students

Assessment

Quiz

Computers

1st Grade

Medium

Created by

Vicky Lagunes

Used 7+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an array in C++?

An array in C++ is a single element of any type.

An array in C++ is a type of function that returns multiple values.

An array in C++ is a collection of elements of the same type stored in contiguous memory.

An array in C++ is a collection of elements of different types stored in random memory.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare an array in C++?

int[10] myArray;

array myArray[10];

int myArray[10];

myArray int[10];

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

-1

1

5

0

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the third element of an array named 'arr'?

arr[1]

arr.get(2)

arr[2]

arr[3]

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a function in C++?

A function in C++ is a reusable block of code that performs a specific task.

A function in C++ is a keyword used for loops.

A function in C++ is a data structure.

A function in C++ is a type of variable.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you define a function in C++?

function_name(parameter_list) return_type { // function body }

return_type function_name { // parameter_list }

A function in C++ is defined as: return_type function_name(parameter_list) { // function body }

function return_type { // function body }

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the return statement in a function?

The return statement pauses the function until it is called again.

The return statement allows a function to take user input.

The purpose of the return statement is to exit a function and return a value to the caller.

The return statement is used to print output to the console.

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?