
Week 6 - Functions (DCS1101)
Presentation
•
Computers
•
University
•
Practice Problem
•
Medium
Yasmin Basiran
Used 7+ 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
33 questions
Inteligencia Artificial
Presentation
•
University
27 questions
CIT1008 - Week 9 (GUI Wireframing)
Presentation
•
University
27 questions
Untitled Presentation
Presentation
•
University
28 questions
Verbals
Presentation
•
University
30 questions
Introducción al Curso de Computación - Nivel B
Presentation
•
KG
26 questions
Medan Magnet
Presentation
•
University
30 questions
DSF - 01 Security Concepts and Models
Presentation
•
University
32 questions
CLASE 5: TEMA III: EL ARTICULO,ADJETIVO, ADVERBIO
Presentation
•
University
Popular Resources on Wayground
10 questions
Safety Day 2026 – Student Review
Quiz
•
9th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
12 questions
Map Skills
Quiz
•
3rd Grade
22 questions
Continents and Oceans
Quiz
•
5th Grade
15 questions
Rounding Decimals
Quiz
•
5th Grade
Discover more resources for Computers
20 questions
Disney Trivia
Quiz
•
University
10 questions
Spanish Greetings and Goodbyes!
Presentation
•
6th Grade - University
20 questions
Physical or Chemical Change/Phases
Quiz
•
8th Grade - University
39 questions
Unit 7 Key Terms
Quiz
•
11th Grade - University
25 questions
SER and Subject Pronouns
Quiz
•
8th Grade - University
38 questions
Unit 6 Key Terms
Quiz
•
11th Grade - University
19 questions
Key Concepts in Buddhism
Quiz
•
University
0 questions
Cell Domain Basic Review (Biology)
Quiz
•
University