
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
Sistem Operasi 25
Quiz
•
12th Grade - University
10 questions
ASSESSING HARDWARE
Quiz
•
University
10 questions
10 ARTIFICIAL INTELLIGENCE
Quiz
•
10th Grade - University
10 questions
QA Knowledge Challenge
Quiz
•
University
10 questions
Quiz CG - Code V2
Quiz
•
University
10 questions
Internet Evolution Quiz
Quiz
•
University
10 questions
Asesmen Harian 1
Quiz
•
11th Grade - University
10 questions
CHAPTER 2: SYSTEM ANALYSIS AND DESIGN
Quiz
•
University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Information Technology (IT)
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
20 questions
christmas songs
Quiz
•
KG - University
20 questions
Holiday Trivia
Quiz
•
9th Grade - University
15 questions
Holiday Movies
Quiz
•
University
14 questions
Christmas Trivia
Quiz
•
3rd Grade - University
20 questions
Christmas Trivia
Quiz
•
University
8 questions
5th, Unit 4, Lesson 8
Lesson
•
KG - Professional Dev...
20 questions
Disney Trivia
Quiz
•
University