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
Learn Database with ARJ
Quiz
•
University
20 questions
PTS INFORMATIKA SEMESTER GENAP
Quiz
•
8th Grade - University
20 questions
Entity Relationship Modeling Quiz
Quiz
•
University
20 questions
MGT334_OS Basics Questions
Quiz
•
University
20 questions
OSS (QUIZ 7) Input/Output Systems
Quiz
•
University
20 questions
SOFTWARE ENGINEERING
Quiz
•
University
20 questions
Python
Quiz
•
University
20 questions
2F-1 | Python Quiz | 14/10/2024
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
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
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University
