
Week 3 - Functions (DCS1101)
Presentation
•
Computers
•
University
•
Practice Problem
•
Medium
Yasmin Basiran
Used 4+ times
FREE Resource
22 Slides • 12 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
34
Show answer
Auto Play
Slide 1 / 34
SLIDE
Similar Resources on Wayground
26 questions
PLSQL - ADVANCED KNOWLEDGE
Presentation
•
University
25 questions
Sistemas de Información
Presentation
•
University
29 questions
AIS615_Chapter 10
Presentation
•
University
25 questions
Estructura interna - análisis
Presentation
•
University
28 questions
Hardware
Presentation
•
12th Grade
25 questions
The internet
Presentation
•
12th Grade
28 questions
Introduction to react-router-dom
Presentation
•
University
28 questions
Information Security Awareness
Presentation
•
University
Popular Resources on Wayground
20 questions
STAAR Review Quiz #3
Quiz
•
8th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
6 questions
Marshmallow Farm Quiz
Quiz
•
2nd - 5th Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
12 questions
What makes Nebraska's government unique?
Quiz
•
4th - 5th Grade