
Quiz Week 6
Authored by Hieu Trinh
Information Technology (IT)
University
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the key difference between a function and a procedure in C++?
Functions are faster than procedures
Functions return a value, procedures don't (void)
Procedures can have parameters, functions cannot
Functions must be declared before procedures
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In this code snippet, what happens to the variable `result` after the function ends?
It becomes a global variable
It is destroyed when the function ends
It can be accessed from main()
It is stored permanently in memory
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the return statement do in the following function?
It prints the result to screen
It exits the function and sends back the boolean result
It continues to the next line of code
It restarts the function
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the function divisible_by(int n, int divisor), what are n and divisor?
Global variables
Return values
Parameters that receive values when the function is called
Local variables that must be initialized
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is being created with this code?
Three separate variables
A function called student
A custom data type that groups related information
An array of students
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many integers can this array hold?
6
7
8
Unlimited
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this code output?
"days"
"Tue"
"Mon"
"Wed"
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 Microsoft
or continue with
%20(1).png)
Apple
Others
Already have an account?