
Week 6 - Functions (DCS1101)
Presentation
•
Computers
•
University
•
Practice Problem
•
Medium
Yasmin Basiran
Used 5+ 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
25 questions
01 Python Basics
Presentation
•
University
28 questions
Error Común
Presentation
•
University
29 questions
1. Comercio Electrónico
Presentation
•
University
26 questions
Sentence Analysis
Presentation
•
University
25 questions
HDD and SSD
Presentation
•
University
32 questions
CHAPTER 1: TODAY'S TECHNOLOGIES
Presentation
•
University
30 questions
Ethical Theories
Presentation
•
University
25 questions
Physical and Chemical Changes Review
Presentation
•
8th Grade
Popular Resources on Wayground
20 questions
Math Review
Quiz
•
3rd Grade
15 questions
Fast food
Quiz
•
7th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
10 questions
Identify Fractions, Mixed Numbers & Improper Fractions
Quiz
•
3rd - 4th Grade
Discover more resources for Computers
20 questions
Guess The App
Quiz
•
KG - Professional Dev...
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
19 questions
Minecraft
Quiz
•
6th Grade - Professio...
40 questions
8th Grade Math Review
Quiz
•
8th Grade - University
20 questions
Block Buster Movies
Quiz
•
10th Grade - Professi...
10 questions
Would you rather...
Quiz
•
KG - University
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...
14 questions
Superhero
Quiz
•
1st Grade - University