
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
Chapter 8: Developing Business IT Solutions
Quiz
•
University
10 questions
SBD QUIZ#13
Quiz
•
University
10 questions
Data Visualization with Qlik Cloud
Quiz
•
University
10 questions
Aislamiento Eléctrico en Hospitales
Quiz
•
University
10 questions
Los 10 escalones
Quiz
•
University
10 questions
Multimedia Networking Quiz
Quiz
•
University
10 questions
Remedial Pengetahuan DNS
Quiz
•
11th Grade - University
10 questions
Quiz 1 Normalisasi
Quiz
•
University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Information Technology (IT)
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
20 questions
christmas songs
Quiz
•
KG - University
20 questions
Holiday Trivia
Quiz
•
9th Grade - University
15 questions
Holiday Movies
Quiz
•
University
14 questions
Christmas Trivia
Quiz
•
3rd Grade - University
20 questions
Christmas Trivia
Quiz
•
University
8 questions
5th, Unit 4, Lesson 8
Lesson
•
KG - Professional Dev...
20 questions
Disney Trivia
Quiz
•
University
