C++ Functions Quiz

C++ Functions Quiz

University

23 Qs

quiz-placeholder

Similar activities

Understanding ICT in Business

Understanding ICT in Business

University

20 Qs

ĐỀ CƯƠNG ÔN TẬP CUỐI HỌC KÌ 2 LỚP 5

ĐỀ CƯƠNG ÔN TẬP CUỐI HỌC KÌ 2 LỚP 5

5th Grade - University

20 Qs

Understanding Database Technologies, Relational Model, and Data

Understanding Database Technologies, Relational Model, and Data

University

20 Qs

Elicitación de requisitos de software, metodología de desarrollo

Elicitación de requisitos de software, metodología de desarrollo

1st Grade - University

18 Qs

Introduction to Multimedia Quiz- Lesson 6 & 7

Introduction to Multimedia Quiz- Lesson 6 & 7

University

20 Qs

Eva_Est_P1_11_PMV

Eva_Est_P1_11_PMV

4th Grade - University

20 Qs

Digitalization and Development

Digitalization and Development

University

20 Qs

Quiz: Ethics in Computing

Quiz: Ethics in Computing

University

19 Qs

C++ Functions Quiz

C++ Functions Quiz

Assessment

Quiz

Information Technology (IT)

University

Practice Problem

Medium

Created by

Leonylyn Bensi

Used 11+ times

FREE Resource

AI

Enhance your content in a minute

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

23 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main purpose of functions in C++?

To execute loops faster

To reduce code redundancy and improve reusability

To replace the main() function

To speed up compilation

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword defines a function that does not return a value?

int

return

void

float

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you call a function in C++?

functionName;

functionName()

call functionName();

define functionName();

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is required in a function declaration?

Function name and parameters

Only the function body

Function name, return type, and parameters (if any)

Only the return type

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen if a function is declared but not called?

It will cause a compilation error

It will execute automatically

Nothing will happen

The program will crash

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default return type of a function in C++ if not specified?

void

int

float

char

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements about function parameters is true?

A function can only have one parameter

Parameters are mandatory in all functions

Parameters act as variables inside the function

Parameters must be initialized in the function declaration

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?