OPL Quiz 5

Ace your homework & exams now with Quizwiz!

Which one of the following statements is NOT correct? Consider dynamic binding of a variable.

A. The variable being assigned is bound to the type of the value of the expression on the left side of the assignment.

Which one of the following choices is correct? With _____ binding, the type of a variable is not specified by a declaration statement, nor can it be determined by the spelling of its name. Instead, the variable is bound to a type when it is assigned a value in an assignment statement.

A. dynamic

Which one of the following choices is correct? The primary advantage of ____ binding of variables to types is that it provides more programming flexibility.

A. dynamic

Which one of the following statements is correct? If the binding first occurs during run time or can change in the course of program execution, it is called ____.

A. dynamic

Which one of the following statements is correct? The asterisk symbol (*) is usually bound to the multiplication operation at ___.

A. language design time

Which one of the following statements is correct? ____ variables are those that are bound to memory cells before program execution begins and remain bound to those same memory cells until program execution terminates.

A. static

______ programming languages allow expressions to be named.

B. Functional

Which one of the following statements is NOT correct?

B. It is convenient to think of computer memory in terms of physical cells, rather than physical cells.

A(n) _____ is a string of characters used to identify some entity in a program.

B. Name

Which one of the following statements is NOT correct? Consider Dynamic Scope with the code segment of the function "big" assuming dynamic-scoping to nonlocal references, as shown below. function big( ) { function sub1( ) { var x = 7; } function sub2( ) { var y = x; var z = 3; } function sub3( ) { x = 3; } var x = 3; }

B. The meaning of the identifier x can be determined at compile time.

Which one of the following statements is NOT correct? Consider static scoping (to allow nested subprograms or not).

B. There are four categories of static-scoped languages.

Which one of the following statements is correct? It is possible to have multiple variables that have the same address by using _____.

B. alias

Which one of the following statements is NOT correct? A variable can be characterized as a sextuple of attributes which are ___.

B. binding

Which one of the following statements is correct? Consider the following Java assignment statement: count = count + 5; The internal representation of the literal 5 is bound at _____.

B. compiler design time

Which one of the following statements is correct? A data type, such as int in C, is bound to a range of possible values at ____.

B. language implementation time

Which one of the following statements is correct? _____ variables are those whose storage bindings are created when their declaration statements are elaborated, but whose types are statically bound.

B. stack-dynamic

____ programming languages are, to varying degrees, abstractions of the underlying von Neumann computer architecture.

C. Imperative

Which one of the following statements is NOT correct?

C. To some people, "name being case sensitive" is a serious detriment to orthogonality, because names that look very similar in fact denote different entities.

Which one of the following statements is correct? A(n) ____ is an association between an attribute and an entity, such as between a variable and its type or value, or between an operation and a symbol.

C. binding

Which one of the following statements is correct? At ____, a variable in a Java program is bound to a particular data type.

C. compile time

Which one of the following statements is correct? Consider the following Java assignment statement: count = count + 5; The meaning of the operator symbol + is bound at ____, when the types of its operands have been determined.

C. compile time

Which one of the following statements is correct? Consider the following Java assignment statement: count = count + 5; The type of count is bound at ____.

C. compile time

For variable, the term ____ is often used interchangeably with name.

C. identifier

Which one of the following statements is NOT correct?

D. Explicit declarations create dynamic bindings to types.

Which one of the following statements is NOT correct? Consider stack-dynamic variable.

D. Stack-dynamic variables are sometimes allocated from the compile-time stack.

Which one of the following statements is NOT correct? Consider the name of a variable.

D. The use of underscores and mixed case in names is a programming design issue as well as a programming style issue.

Which one of the following choices is NOT correct? The phrase "C-based languages" is used to refer to ____.

D. Web C++

Which one of the following statements is correct? A variable may be bound to a storage cell when the program is loaded into memory at ____.

D. load time

Which one of the following statements is correct? A variable's value is sometimes called its ____ because it is what is required when the name of the variable appears in the right side of an assignment statement.

D. r-value

Which one of the following statements is correct? Aliasing is a hindrance to ____ because it allows a variable to have its value changed by an assignment to a different variable.

D. readability

Which one of the following statements is NOT correct?

E. Alias may hinder the integrity of the program and correctness in high-level language.

Which one of the following statements is NOT correct? Consider stack-dynamic variable.

E. Each active copy of the recursive subprogram shares one copy of the local variables.

Which one of the following statements is NOT correct? Consider static scoping. Consider the following JavaScript function, big, in which the two functions sub1 and sub2 are nested: function big( ) { function sub1( ) { var x = 7; sub2( ); } function sub2( ) { var y = x; } var x = 3; sub1( ); }

E. Search for x begins with function big, where x is found but ignored.

Which one of the following statements is NOT correct?

E. Special words in programming languages tend to be long in length.

Which one of the following statements is NOT correct? Some of the problems with implicit declarations can be avoided by requiring names for specific types to begin with particular special characters.

E. The names @apple and %apple in the same namespace are essentially same in Perl.

Which one of the following statements is NOT correct? For an example of explicit heap-dynamic variables, consider the following C++ code segment: int *intnode; // Create a pointer intnode = new int; // Create the heap-dynamic variable // more codes here and then. . . delete intnode; // Deallocate the heap-dynamic variable

E. The storage of the variable is allocated during the compile time.

Sebesta05] Which one of the following statements is NOT correct? Consider the following skeletal C function: void sub() { int count; . . . while (. . .) { int count; count++; . . . } }

E. This code is illegal in Java and C#.

Which one of the following choices is correct? Another kind of implicit type declarations uses context. This is sometimes called _____. In the simpler case, the context is the type of the value assigned to the variable in a declaration statement. For example, in C# a declaration of a variable must include an initial value, whose type is made the type of the variable.

E. type inference

Which one of the following statements is NOT correct? A program ____ is an abstraction of a computer memory cell or collection of cells.

E. variable

Which one of the following statements is correct?

F. Global variables are a special category of local variables.

Which one of the following statements is NOT correct? Consider Explicit Heap-Dynamic Variables.

F. Heap management can be implemented cost-effectively using dynamic stack.

Which one of the following statements is NOT correct?

F. Names in C++ have no length limit and all characters in them are significant.

Which one of the following statements is correct? The ____ of a variable is the range of statements in which the variable is visible.

F. Scope

Which one of the following statements is NOT correct? Consider Explicit Heap-Dynamic Variables.

F. These variables are bound to a type at compile time, that binding is dynamic.

Which one of the following statements is correct? Consider the following Java assignment statement: count = count + 5; The value of count is bound at ___ with this statement.

F. run time.

Which one of the following statements is correct? The binding of a variable to a storage cell may not happen until ____ in some cases, as with variables declared in Java methods.

F. run time.

Which one of the following statements is correct? A binding is ____ if it first occurs before run time begins and remains unchanged throughout program execution.

F. static

A variable can be characterized by a collection of properties, or attributes, the most important of which is ____.

G. Type

Which one of the following statements is correct? ALGOL 60 introduced the method of binding names to nonlocal variables called ____ scoping.

G. static

Which one of the following statements is NOT correct? Bindings can take place at ____.

G. termination time


Related study sets

4 Indications that a Chemical Reaction has Occurred

View Set

Final Exam Lifespan Developmental Psych

View Set

Quiz review - composite functions & inverse functions

View Set

Chapter 1: Introductory to the Human Body

View Set

Chapter 1 Operations Management (OPSY 5315)

View Set

Priority Setting Framework- Beginner

View Set

Infrastructure Services e-Learning Test

View Set