opl 1

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

13. Which of the following is true of Orthogonality in a programming language? a. Every combination of primitives is legal and meaningful b. The meaning of a feature is independent of its context c. Too much of it can make a language unnecessarily complex d. All of the above e. None of the above

All of the above

40. A programming environment is the collection of tools used in the development of software. Which of the following is needed, at a minimum, to make a programming environment? a. A file system b. A text editor c. A linker & compiler d. Only c e. All of the above

All of the above

6. How is Perl a hybrid implementation system? a. Because Perl programs are partially compiled to detect errors before interpretation and to simplify the interpreter. b. Because Perl uses both electric and gas in the system. c. Because Perl does not require a human to write the code d. Because Perl is the most expensive diamond in the world e. Because Perl can be used in all languages

Because Perl programs are partially compiled to detect errors before interpretation and to simplify the interpreter.

17. Why is learning programming languages so VITAL to us as programmers? a. Because having the foundation is essential, it helps us open up to more ideas and solutions. Ideas from one programming language can translate to another. b. Learning all the programming languages makes programmers employable c. It is better to know many languages than to know one pretty well d. It makes you humbler as a programmer e. Having foundation allows us as programmers to be able to work with anything and makes us smarter

Because having the foundation is essential, it helps us open up to more ideas and solutions. Ideas from one programming language can translate to another.

7. Orthogonality is a part of which evaluation criteria for programming languages? a. Readability b. Writability c. Reliability d. All of the above e. Both a and b

Both a and b

24. Which of the following is not a characteristic of an imperative language: a. Supports object-oriented programming. b. Highly benefited by the Von Neumann computer architecture. c. Computation is done by applying functions based on the data given. d. C++ is considered an imperative language e. One of its main features is the ability to assign values to variables.

Computation is done by applying functions based on the data given.

28. Based on the language evaluation criteria, where does training the programmer to use the language classify into? a. Cost b. Reliability c. Writability d. Training e. Readability

Cost

12. What difference does Java have from C++ that is NOT true? a. No pointers b. Supports only object-oriented programming c. Lacks struct d. Lacks enum e. Does not have references

Does not have references

11. Which is an example of reliability in programming languages? a. Orthogonality b. Data types c. Exception handling d. Feature multiplicity e. Support for abstraction

Exception handling

25. The line of code count++ is an example of ______. a. Reliability b. Type checking c. Expressivity d. Aliasing e. Portability

Expressivity

42. An example of a rule-based language, where rules are specified in no particular order is a: a. Logic programming language b. Scripting language c. Functional language d. Imperative language e. Markup language

Logic programming language

44. What is one feature that designers of Java dropped to improve reliability? a. Type checking b. Operator overloading c. Memory allocation d. Exception handling e. None of the above

Memory allocation

18. What increases a program's writability? a. Orthogonality b. Aliasing c. Type checking d. Exception handling e. Data types

Orthogonality

39. Which one of these statements is an example of syntax design improving readability of a program? a. Allowing some keywords to be legal variable names if those keywords are not in the same scope of the variables. b. Meaning of reserved words changing depending on the context they're in c. UNIX command grep d. Using more reserved words like "end loop" instead of "end" to be more specific (used in Ada) e. a & d.

Using more reserved words like "end loop" instead of "end" to be more specific (used in Ada)

37. How is Perl similar to imperative languages? a. It is always compiled into an intermediate language before it is being executed b. It is not similar to it at all c. all scalar variable has to begin with $ d. Automatically type conversion from number to string e. It is very alike Java

It is always compiled into an intermediate language

27. Which of these is generally true of compiler performance? a. Slow translation, slow execution b. Slow translation, fast execution c. Fast Translation, fast execution d. Fast Translation, slow execution e. None of the above

Slow translation, fast execution

3. Imperative languages are the most dominant due to? a. Von Neumann Architecture b. Ease of readability c. Ability to scale d. High level programming languages e. Ability to implement easily

Von Neumann Architecture

32. What is Hybrid Implementation Systems? a. A compromise between compilers and pure interpreters. b. A program that is more readable. c. A program that has multiple programming languages. d. A program that has multiple compilers e. A program that has multiple interpreters.

A compromise between compilers and pure interpreters.

36. Which best defines orthogonality? a. Having more than one way to accomplish a particular operation. b. Having two or more distinct names in a program that can be used to access the same memory cell. c. A collection of techniques that compilers may use to decrease the size and/or increase the execution speed of the code they produce. d. A relatively small set of primitive constructs that can be combined in a relatively small number of ways. e. Intercept run-time errors and take corrective measures.

A relatively small set of primitive constructs that can be combined in a relatively small number of ways.

43. What was the reason that brought about the structured-programming event of the late 1960s and early 1970s? a. A shift in major cost of computing from hardware to software caused by hardware costs decreasing and programmer costs increasing. b. A shift in major cost of computing from software to hardware caused by hardware costs increasing and programmer costs decreasing. c. Decreases in programmer productivity. d. Less complex problems were being solved by computers. e. Programs were being written for simpler and smaller tasks.

A shift in major cost of computing from hardware to software caused by hardware costs decreasing and programmer costs increasing.

10. Difference between Java and JavaScript? a. Unlike Java, JavaScript does not support inheritance b. Java is not OOP while JavaScript is object oriented c. JavaScript is dynamically typed while Java is strong typed d. JavaScript is the only one that makes use of dynamic binding e. a and c

a and c

2. Which of the following is a criterion for evaluating a language? a. cost b. readability c. reliability d. orthogonality e. all of the above

all of the above

23. What was wrong with using machine code? a. poor readability b. poor modifiability c. tedious d. machine deficiencies e. all of the above

all of the above

1. Which of the following is not a reason to study concepts of programming languages? a. allows to choose an appropriate language to a certain project b. allows to start writing in a new language without learning it c. allows to understand the commonalities between programming languages d. allows to write better in the languages one already knows e. all of the above

allows to start writing in a new language without learning it

20. Which of the following is NOT an example of feature multiplicity in Java for incrementing a count: a. count = count + 1 b. count += 1 c. count = 1 d. count++ e. ++count

count = 1

41. In an object-oriented design, the concept of packaging data and procedures into a single object is called _____. a. enclosure b. encapsulation c. verification d. concatenation e. validation

encapsulation

38. Which of the following is NOT a programming language category? a. imperative b. functional c. logic d. integral e. object-oriented

integral

9. JavaScript does not require translation and it can immediately display run-time errors, but it suffers from slow execution and requires a lot of space. JavaScript is most likely ________. a. compiled b. interpreted c. a hybrid of interpreted and compiled d. a just-in-time system e. None of the above

interpreted

29. Which of the following is not a characterizing feature of imperative programming languages? a. Applying functions to parameters b. Usage of variables c. Object-oriented programming d. Usage of iteration e. Assignment statements

Applying functions to parameters

45. In what order are steps executed in the processor? a. Run b. Fetch, increment, decode, execute c. Execute, increment, decode, fetch d. Fetch, decode, increment, execute e. Fetch, execute, increment, decode

Fetch, increment, decode, execute

14. Which of the following factors is considered as being integral to the facilitation of the rise in popularity of object-oriented languages (by aiding in the possibility of reuse of current software)? a. Dynamic binding b. Data abstraction c. Data objects d. Limited data access e. Inheritance

Inheritance

4. According to the Von Neumann Architecture, the bottle neck occurs when a. Instructions are executed faster than the speed of the connection b. Using an interpreter instead of a compiler c. Memory is coupled with the CPU d. Data and programs aren't stored in memory e. The use of an imperative programming language

Instructions are executed faster than the speed of the connection

15. Why is pure interpretation slower than compilation? a. Uses linking and loading b. The interpreter takes up more space c. It doesn't translate to machine code, but directly reads and executes it d. Because of the von Neumann bottleneck effect e. Because the interpreter doesn't have as much access to memory

It doesn't translate to machine code, but directly reads and executes it

34. Which of the following is not part of the criteria of Reliability? a. Portability b. Type Checking c. Aliasing d. Exception Handling e. Readability and Writability

Portability

22. What is an advantage of pure interpretation over compilation? a. Faster execution time b. Less space required c. Precise debugging d. Statements must only be decoded once e. Works with less complex statements

Precise debugging

30. Which of the following is true? a. A preprocessor is a program that processes a program just after the program is compiled. b. Preprocessor instructions are embedded in programs c. A preprocessor can replace the job of a compiler or interpreter d. A preprocessor does not handle include files, just the main file e. All the above

Preprocessor instructions are embedded in programs

5. A Preprocessor processes a program immediately before the program is compiled to expand embedded ______ a. Preprocessor micros b. Preprocessor macros c. Postprocessor macros d. Postprocessor micros e. Postprocessor systems

Preprocessor macros

16. Which of the following is FALSE about pseudocode (in the context of Programming Languages)? a. Examples of pseudocode include speed coding, UNIVAC, and Short Code b. Pseudocode were developed to program slow, unreliable machines with small memories with a lack of supporting software. c. Programming was done with high level programming languages for the UNIVAC 1107 d. Pseudocode language methods, such as using blocks of relocatable addresses to fully solve the problem of absolute addressing, helped further advance the development of higher-level languages. e. Automatic programming implemented short code with a pure interpreter.

Pseudocode language methods, such as using blocks of relocatable addresses to fully solve the problem of absolute addressing, helped further advance the development of higher-level languages.

19. What are the main criteria of language design that conflict? a. Reliability and cost of execution b. Orthogonality and Simplicity c. Data types and syntax design d. Writability and Reliability e. None of the above

Reliability and cost of execution

21. What is NOT part of the Hybrid implementation System? a. Source Program b. Intermediate Code Generator c. Interpreter d. Lexical Analyzer e. Semantic Analyzer

Semantic Analyzer

8. What is type checking? a. A program written in a language that does not support natural ways to express the required algorithms will necessarily use unnatural approaches b. Testing for type errors in a given program, either by the compiler or during program execution c. The ability of a program to intercept run-time errors, take corrective measures, and then continue is an obvious aid to reliability d. Having two or more distinct names in a program that can be used to access the same memory cell. e. there are very powerful operators that allow a great deal of computation to be accomplished with a very small program.

Testing for type errors in a given program, either by the compiler or during program execution

26. What is writability? a. The ease with which programs can be read and understood. b. The ease with which language can be used to create programs. c. Program's conformance to specifications. d. Have a manageable set of features and constructs in a language. e. Language's syntax.

The ease with which language can be used to create programs.

35. What is portability? a. The applicability to a wide range of applications b. The ease with which programs can be moved from one implementation to another c. Few constructs, a small number of primitives, a small set of rules for combining them d. A language that does not support "natural" ways of expressing an algorithm will require the use of "unnatural" approaches, and hence reduced reliability e. The completeness and precision of the language's official definition

The ease with which programs can be moved from one implementation to another

33. Aliasing is: a. A language that has reduced readability. b. A way to intercept run-time errors. c. A way to test for type errors. d. The presence of two or more distinct referencing methods for the same memory location. e. None of the above.

The presence of two or more distinct referencing methods for the same memory location.

31. What is the purpose of lexical analysis in a compiler? a. To divide sequences of code into smaller sequences to make it easier to interpret as machine code. b. To ensure that languages using the compiler are following the protocols for the compiler. c. To check for syntax errors. d. To check for semantic accuracy in code. e. To divide the code into tokens with meaning, allowing for the syntax to the be determined for accuracy.

To divide the code into tokens with meaning, allowing for the syntax to the be determined for accuracy.


Ensembles d'études connexes

Developing Therapeutic Relationships: Empathy and Emotional Intelligence 2

View Set

Combo with "HESI A2 MATH" and 1 other

View Set

anatomy and physiology 1: chapter 13

View Set

Ch 37: Musculoskeletal Trauma PrepU

View Set