
C++ Functions and Arrays Quiz
Authored by ZPPSU VLs
Computers
University
Used 9+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
34 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why do we use functions in a program?
To organize code and reduce redundancy
To make the program longer
To increase memory usage
To make debugging harder
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type of function is provided by the C++ library?
Custom
Built-in
Manual
User-defined
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct term for data sent to a function?
Conditions
Arguments
Parameters
Pointers
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the return type in a function indicate?
Code inside the function
Number of arguments
How many times the function runs
Type of value the function return
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct order of a function definition?
returnType, functionName, parameters
functionName, returnType, parameters
returnType, parameters, functionName
parameters, returnType, functionName
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a built-in C++ function?
sqrt()
calculateTotal()
add_numbers()
runProgram()
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output of this code?
int square(int x) { return x * x; }
int main() { cout << square(3); }
6
3
9
Error
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?