
Fundamentals of Computing Quiz
Authored by NURUL JAMAL
Professional Development
Professional Development

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 a function in programming?
A method of error handling
A set of instructions to perform a specific task
A type of variable
A data structure
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of a function signature?
To define the function's return type and name
To execute the function
To declare global variables
To create a loop
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the 'return' statement do in a function?
Ends the program
Returns a value to the calling function
Declares a variable
Prints output to the console
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In C++, what is a user-defined function?
A function created by the programmer
A function that only returns void
A function that cannot be modified
A function that is built into the language
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to call a function named 'calculate'?
calculate();
execute calculate;
calculate;
call calculate();
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code output?
int x = 5; cout << x;
x
5
Error
None
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the scope of a local variable?
In all functions
Only in the main function
Only within the function it is defined
Throughout the entire program
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?