C++ Functions Quiz
Quiz
•
Information Technology (IT)
•
University
•
Practice Problem
•
Medium
Leonylyn Bensi
Used 11+ times
FREE Resource
Enhance your content in a minute
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

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
20 questions
ICT G 7 Chapter 2.1 Input and Output Devices
Quiz
•
7th Grade - University
20 questions
AISB223 Chapter 12: Confidentiality and Privacy Controls
Quiz
•
University
20 questions
SYBAF Internal Practice Test
Quiz
•
University
20 questions
HT - 13 Identifica principales aplicaciones
Quiz
•
University
20 questions
STS Informatika Kelas 8 Semester 1
Quiz
•
8th Grade - University
18 questions
2.2 Data Transmission
Quiz
•
University
20 questions
Metode Penilaian Mutu Layanan Digital
Quiz
•
University
18 questions
Quiz 02-Finals-IT 222-FIAS
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
Discover more resources for Information Technology (IT)
7 questions
How James Brown Invented Funk
Interactive video
•
10th Grade - University
5 questions
Helping Build the Internet: Valerie Thomas | Great Minds
Interactive video
•
11th Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
19 questions
Review2-TEACHER
Quiz
•
University
15 questions
Pre2_STUDENT
Quiz
•
University
20 questions
Ch. 7 Quadrilateral Quiz Review
Quiz
•
KG - University
