CS 4337 Quiz #5

¡Supera tus tareas y exámenes ahora con Quizwiz!

A. language design time

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

B. language implementation time

21. [Sebesta05] 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 ____.

C. compile time

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

D. load time

23. [Sebesta05] 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 ____.

F. run time.

24. [Sebesta05] 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.

C. compile time

25. [Sebesta05] 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

26. [Sebesta05] 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.

B. compiler design time

27. [Sebesta05] 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 _____.

F. run time.

28. [Sebesta05] 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. static

29. [Sebesta05] 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.

A. dynamic

30. [Sebesta05] 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 ____.

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

32. [Sebesta05] 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.

A. dynamic

35. [Sebesta05] 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. The variable being assigned is bound to the type of the value of the expression on the left side of the assignment.

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

A. static

37. [Sebesta05] 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.

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

39. [Sebesta05] 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.

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

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

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

F. Scope

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

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

45. [Sebesta05] Which one of the following statements is correct?

G. static

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

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

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

C. identifier

5. [Sebesta05] For variable, the term ____ is often used interchangeably with name.

B. Name

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

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

7. [Sebesta05] Which one of the following statements is NOT correct?

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

8. [Sebesta05] Which one of the following statements is NOT correct? Consider the name of a variable.

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.

9. [Sebesta05] Which one of the following statements is NOT correct?

D. Web C++

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

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

10. [Sebesta05] Which one of the following statements is NOT correct?

B. Functional

3. [Sebesta05] ______ programming languages allow expressions to be named.

D. Explicit declarations create dynamic bindings to types.

[Sebesta05] Which one of the following statements is NOT correct?

C. Imperative

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

B. binding

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

E. variable

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

B. alias

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

D. readability

14. [Sebesta05] 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.

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

15. [Sebesta05] 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.

16. [Sebesta05] Which one of the following statements is NOT correct?

*D. r-value

17. [Sebesta05] 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.

C. binding

18. [Sebesta05] 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

G. termination time

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

G. Type

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

Another kind of implicit type declarations uses context. This is sometimes called [type inference] 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.

Which one of the following choices is correct?

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

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; }

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

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. This code is illegal in Java and C#.

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

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

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

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

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

A. dynamic

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.

B. stack-dynamic

[Sebesta05] 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.


Conjuntos de estudio relacionados

Chapter 35: Assessment of Immune function

View Set

2130 Q2, econ exam 1, Managerial Economics Exam 1, UNCC Econ 3125 Final Exam MC Prep, ECON 3125 Final Exam, exam 1 study, ECON 380, CHP 2 MC, ECON 3125 Metzgar, MGMT Econ final multiple choice, Managerial Economics Final, econ quiz 1 review, Econ Tes...

View Set

Chap 11 Texas Statutes and rules pertinent to life insurance only

View Set