
Chapter 4 Function Declaration and Usage
Quiz
•
Information Technology (IT)
•
University
•
Practice Problem
•
Easy
MAHANI BINTI ZAKARIA (POLIMAS)
Used 6+ times
FREE Resource
Enhance your content in a minute
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is a function prototype?
A function call
A function with no name
A declaration of a function before main()
A loop
Answer explanation
A function prototype tells the compiler about the function's name, return type, and parameters before it is used.
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following is a valid function declaration?
int sum(int a, int b);
function sum(int a, int b);
sum(int a, int b);
int sum;
Answer explanation
This correctly defines the return type, function name, and parameter types.
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following statements is true about return statements?
All functions must return a value
Only main() uses return
void functions do not use return value
You can return multiple values using return
Answer explanation
void means the function does not return anything, so no value is used with the return statement.
4.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What will be the output of this code?
7
34
Error
Nothing
Answer explanation
The function add(3, 4) returns 7, which is then printed.
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the name of the values passed into a function?
Return type
Variables
Arguments or Parameters
Function name
Answer explanation
Values passed into a function are called arguments or parameters.
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
10 questions
Latsol
Quiz
•
10th Grade - University
10 questions
CHAPTER 2: SYSTEM ANALYSIS AND DESIGN
Quiz
•
University
10 questions
Repaso Segundo Parcial - AdC 2024 - K1031
Quiz
•
University
10 questions
ASSESSING HARDWARE
Quiz
•
University
10 questions
Quiz CG - Code V2
Quiz
•
University
10 questions
Le reti di computer
Quiz
•
10th Grade - University
10 questions
Internet Evolution Quiz
Quiz
•
University
10 questions
Quiz sobre Golpes e Segurança Digital
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
