
Week 6 - Functions (DCS1101)
Presentation
•
Computers
•
University
•
Practice Problem
•
Medium
Yasmin Basiran
Used 6+ times
FREE Resource
22 Slides • 13 Questions
1
2
3
Poll
If you had to check “Pass/Fail” for 10 students, would you rather copy the code 10 times or reuse something?
Copy code 10 times
Reuse something
4
Open Ended
Why do humans divide work into roles?
5
6
7
8
9
10
11
12
13
14
15
Multiple Choice
What is the main purpose of a function?
16
Multiple Choice
Where is a function prototype usually written?
17
Multiple Choice
Passing data by value means:
18
Multiple Choice
What does the return statement do?
The return statement exits a function and returns a value.
19
20
21
22
23
24
25
Multiple Choice
What is the best way to explain a global variable?
26
Multiple Choice
Which error happens if return type mismatches?
Compilation error
27
28
29
Open Ended
Write a function that displays a welcome message "Hello!".
30
Open Ended
Write a function that returns true if a score above 50 is a pass.
31
Multiple Choice
What is the error of this code?
int total() {
return "10";
}
32
Open Ended
What is the error of this code?
int add(int a, int b) {
cout << a + b;
}
33
Multiple Choice
What happens if a function has return type int but no return statement?
34
35
Show answer
Auto Play
Slide 1 / 35
SLIDE
Similar Resources on Wayground
30 questions
String_Intro
Presentation
•
University
29 questions
ISWS 2025 - Human-centric AI Evaluation
Presentation
•
University
28 questions
Aula 3 - Engenharia de Software
Presentation
•
University
28 questions
TIP Model
Presentation
•
University
29 questions
Vivobook Pro 14x M7400
Presentation
•
University
28 questions
Pengenalan Canva
Presentation
•
University
28 questions
unit 6 continue
Presentation
•
University
28 questions
Python 3 - szakmérnök
Presentation
•
University
Popular Resources on Wayground
6 questions
Secondary Safety Quiz
Presentation
•
9th - 12th Grade
10 questions
MyPath Diagnostic Overview
Presentation
•
6th - 8th Grade
20 questions
Lab Safety Quiz
Quiz
•
6th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Adding and Subtracting Decimals
Quiz
•
5th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
21 questions
Lab Safety
Quiz
•
10th Grade
Discover more resources for Computers
20 questions
Disney Trivia
Quiz
•
University
20 questions
Brand Trivia
Quiz
•
9th Grade - University
10 questions
Would you rather...
Quiz
•
KG - University
21 questions
Mapa países hispanohablantes
Quiz
•
1st Grade - University
10 questions
Spanish Greetings and Goodbyes!
Presentation
•
6th Grade - University
12 questions
CE 2b Early Documents Review
Quiz
•
7th Grade - University
30 questions
Multiplying and Dividing Integers
Quiz
•
6th Grade - University
13 questions
Back to School
Quiz
•
KG - University