CS 424 Test 1(With complete solutions)
Writeability correct answers the ease with which a language can be used to create programs. Simplicity and orthogonality. Support abstraction such as functions to prevent re writing the same code multiple times. Readability correct answers the ease with which programs can be read and understood. Reliability correct answers conformance to specifications (i.e. performs to its specifications). Type checking for errors, exception handling intercepts run-time errors and takes corrective measures. Cost correct answers the ultimate total cost. Execution costs (run time type checking improves reliability but adds execution time cost), compile time costs (can increase compile time but decrease execution time) Reliability vs. cost of execution correct answers Example: Java demands all references to array elements be checked for proper indexing, which leads to increased execution costs Reliability vs. writeability correct answers Example: APL provides many powerful operators (and a large number of new symbols), allowing complex computations to be written in a compact program but at the cost of poor readability Writeability vs reliability correct answers Example: C++ pointers are powerful and very flexible but are unreliable How is an interpreter different from a compiler? correct answers Compiler translates source language into machine language. Slow transition, fast execution. Interpreter executes a program line by line by simulating a computer whose machine language is the language being processed. What are the characteristics of imperative programming languages and how do they model the architecture of the von Neumann computer? correct answers Data and programs stored in memory Memory is seperate from CPU Instructions are transferred from memory to CPU Data is moved from memory to the CPU for processing and back to the memory for storage Imperitive languages: Variables model memory cells Assignment statements model data movement Iteration is efficient What is the von Neumann bottleneck? correct answers it is a primary limiting factor in the speed of computers
Document information
- Uploaded on
- May 28, 2024
- Number of pages
- 5
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers