C++ Functions Quiz
Quiz
•
Information Technology (IT)
•
University
•
Medium
Leonylyn Bensi
Used 11+ times
FREE Resource
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
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
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
Unit-1 Introduction to Cloud Computing
Quiz
•
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
20 questions
ICT G 7 Chapter 2.1 Input and Output Devices
Quiz
•
7th Grade - University
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
4 questions
Activity set 10/24
Lesson
•
6th - 8th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
30 questions
October: Math Fluency: Multiply and Divide
Quiz
•
7th Grade
Discover more resources for Information Technology (IT)
10 questions
Halloween Movies Trivia
Quiz
•
5th Grade - University
7 questions
Central Idea of Informational Text
Interactive video
•
4th Grade - University
7 questions
Review for You: Using Commas
Interactive video
•
4th Grade - University
5 questions
Using Context Clues
Interactive video
•
4th Grade - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
14 questions
Eat Healthy,Be Healty
Quiz
•
4th Grade - University
7 questions
Safari Scholar: Searching for Subject-Verb Agreement
Interactive video
•
4th Grade - University
