
chapter 5 Function Behavior Quiz3
Quiz
•
Information Technology (IT)
•
University
•
Practice Problem
•
Easy
MAHANI BINTI ZAKARIA (POLIMAS)
Used 5+ times
FREE Resource
Enhance your content in a minute
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following function calls is correct if you have this prototype:
float average(int, int);
average(3, 5.5);
average("3", "5");
average(3, 5);
average();
Answer explanation
Both arguments should be integers to match the prototype.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
Welcome, Ali
Hello Ali
Error
Welcome
Answer explanation
The function prints a message using the value passed as the name parameter.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
25
10
5
error
Answer explanation
The function multiplies 5 by 5 and returns 25.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to pass control back from a function to the calling function?
back
continue
return
break
Answer explanation
return is used to end the function and send back a value to the caller.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the parameters in a function?
To define the return type
To give the function a name
To receive input values
To print output
Answer explanation
Parameters act like input containers that the function uses for calculations.
Similar Resources on Wayground
10 questions
PT101: Quiz No. 1
Quiz
•
University
10 questions
Module 2
Quiz
•
University
10 questions
REVIEW TIME
Quiz
•
9th Grade - University
10 questions
Materi Berpikir Komputasional
Quiz
•
9th Grade - University
10 questions
Quiz Meet 2 Mini SC Programing
Quiz
•
University
10 questions
Quiz Perangkat Keras Komputer
Quiz
•
7th Grade - University
10 questions
Decision-Making Process in Data Modelling
Quiz
•
11th Grade - University
10 questions
Quiz Array
Quiz
•
10th Grade - 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
