
chapter 5 Basic Concepts of Function in C++

Quiz
•
Information Technology (IT)
•
University
•
Easy
MAHANI BINTI ZAKARIA (POLIMAS)
Used 3+ times
FREE Resource
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the main purpose of using functions in a C++ program?
To increase the size of the program
To slow down the execution
To divide the program into smaller parts
To reduce readability
Answer explanation
Functions help organize code into smaller blocks that are easier to manage and reuse.
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which keyword is used to define a function in C++?
define
void
function
return
Answer explanation
The keyword void is used when a function does not return a value. It is part of the function definition.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many times can a function be called in a C++ program?
Only once
Twice
As many times as needed
Never
Answer explanation
Functions can be called repeatedly to perform a task, which helps avoid writing the same code again
4.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What will be the output of this code?
Hello!
Hello!Hello!
Error
Nothing
Answer explanation
The function greet() is called twice, so "Hello!" will be printed two times.
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which part of the function defines the data type of the returned value?
Function body
Function name
Return type
Parameters
Answer explanation
The return type (e.g., int, void, float) defines what kind of value the function will return.
Similar Resources on Wayground
5 questions
pengenalan pemprograman prosedural2

Quiz
•
8th Grade - University
10 questions
Sequencing Blockly - 1

Quiz
•
7th Grade - University
10 questions
Arrays in CQuiz

Quiz
•
1st Grade - University
9 questions
Blockly Programming Quiz [Level 1B]

Quiz
•
7th Grade - University
10 questions
Uji Pemahaman Berpikir Komputasional

Quiz
•
10th Grade - University
8 questions
Intro to JS: Functions, Scope & Objects

Quiz
•
11th Grade - University
10 questions
Scratch - základy

Quiz
•
6th Grade - University
10 questions
C Programming Quiz

Quiz
•
University
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Information Technology (IT)
11 questions
NFL Football logos

Quiz
•
KG - Professional Dev...
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
38 questions
Unit 6 Key Terms

Quiz
•
11th Grade - University
20 questions
La Hora

Quiz
•
9th Grade - University
7 questions
Cell Transport

Interactive video
•
11th Grade - University
7 questions
What Is Narrative Writing?

Interactive video
•
4th Grade - University