Midterm Exam Review

Midterm Exam Review

University

10 Qs

quiz-placeholder

Similar activities

PPL

PPL

University

6 Qs

PPL

PPL

University

6 Qs

Methods in Java

Methods in Java

University

15 Qs

Object Oriented Programming

Object Oriented Programming

University

13 Qs

OOAD ONLINE QUIZ

OOAD ONLINE QUIZ

University - Professional Development

8 Qs

Activity 3

Activity 3

University

10 Qs

Nested Classes + java

Nested Classes + java

University

10 Qs

Java variables

Java variables

University

10 Qs

Midterm Exam Review

Midterm Exam Review

Assessment

Quiz

Computers

University

Medium

Created by

Romualdo Bautista

Used 6+ times

FREE Resource

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?