
Midterm Exam Review
Authored by Romualdo Bautista
Computers
University
Used 11+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In JavaScript, what is the scope of a variable declared with the let keyword within a block?
a) Function scope
b) Global scope
c) Block scope
d) Module scope
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements about variable lifetime is true?
a) A global variable's lifetime is limited to the block in which it is defined.
b) A local variable's lifetime extends across the entire program.
c) A static variable's lifetime is the duration of the program's execution.
d) An automatic variable's lifetime is the duration of the program's execution.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best describes "scope" in programming?
a) The duration for which a variable exists in memory.
b) The region of the code where a variable is accessible.
c) The process of associating a variable with a value.
d) The technique used to allocate memory for variables.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Python, if a variable is declared outside any function or class, what is its scope?
a) Local
b) Enclosed
c) Global
d) Built-in
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary difference between "static" and "dynamic" binding?
a) Static binding occurs at runtime, whereas dynamic binding occurs at compile-time.
b) Static binding occurs at compile-time, whereas dynamic binding occurs at runtime.
c) Static binding is used only for global variables, whereas dynamic binding is used for local variables.
d) Static binding is for variables, whereas dynamic binding is for functions.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best describes "binding" in programming?
a) The region of the code where a variable is accessible.
b) The duration for which a variable exists in memory.
c) The process of associating a variable with a value or function.
d) The method used to manage memory allocation.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used in many programming languages to refer to a variable in the global scope from within a local scope?
a) local
b) global
c) extern
d) static
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Programación II Parte 5
Quiz
•
University
13 questions
Podsumowanie: binarny, komputer, sieć
Quiz
•
7th Grade - University
15 questions
Data Mining - Classification Mining
Quiz
•
University
9 questions
CHAPTER 5 ONLINE QUIZ
Quiz
•
University
8 questions
Arquitetura de computadores (Aula 2)
Quiz
•
University
12 questions
Javascript
Quiz
•
University
9 questions
Los periféricos del computador
Quiz
•
1st Grade - Professio...
10 questions
Networking Essentials - Test 5
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade