
chapter 5 Basic Concepts of Function in C++
Authored by MAHANI BINTI ZAKARIA (POLIMAS)
Information Technology (IT)
University
Used 10+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Quiz 1
Quiz
•
10th Grade - University
10 questions
LD siskom SE
Quiz
•
10th Grade - University
10 questions
Refresh Python
Quiz
•
University
10 questions
Quiz Booting dan CPU
Quiz
•
10th Grade - University
10 questions
Data Management and Storage
Quiz
•
University
10 questions
KUIS DENGAN TOPIK MATERI PERTEMUAN 1
Quiz
•
10th Grade - University
10 questions
VertexR Session
Quiz
•
University
10 questions
Penilaian Operasi Komputer Dasar
Quiz
•
7th Grade - University
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
5 questions
What is Presidents' Day?
Interactive video
•
10th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
20 questions
Mardi Gras History
Quiz
•
6th Grade - University
10 questions
The Roaring 20's Crash Course US History
Interactive video
•
11th Grade - University
17 questions
Review9_TEACHER
Quiz
•
University