Sunday, March 10, 2013

Concepts of Programming Languages - Chapter 2


Review Questions

1. In what year was Plankalkül designed? In what year was that design
published?
1943, 1972

3. What does Plankalkül mean?
Program Calculus

5. What is the number of bits in a single word of the UNIVAC I's memory? How are the bits grouped?
72, they are grouped as 12 six-bit bytes

7. Who developed the Speedcoding system for the IBM 701?
John Backus

8. Who developed Short Code? Why is Short Code called automatic programming?
John Mauchly. Because it clearly simplified the programming process.

9. Under what environmental consideration was Fortran developed? Which is the first version of Fortran?
- Computers had small memories and were slow and relatively unreliable
- the primary use of computers was for scientific computations
- there were no existing efficient and effective ways to program computers
- because of the high cost of computers compared to the cost of programmers, speed of the generated object code was the primary goal of the first Fortran compilers.
Fortran 0

10. What was the most significant feature added to Fortran I to get Fortran II?
Independent compilation of subroutines

11. What control flow statements were added to Fortran IV to get Fortran 77?
Character string handling, logical loop control statements, and an If with an optional Else clause

12. Which version of Fortran was the first to have any sort of dinamic variables?
Fortran 4

13. Which version of Fortran was the first to have character string handling?
Fortran 77

14. Why were linguists interested in artificial intelligence in the late 1950s?
Linguists were concerned with natural language processing

17. What dialect of LIST is used for introductory programing courses at some universities?
Scheme

22. On what language was COBOL based?
English

23. In what year did the COBOL design process begin?
May 28 and 29, 1959

26. Which data type does the original BASIC language support?
Floating point

28. PL/I was designed to replace what two languages?
Fortran and COBOL

46. What is the primary application for Objective-C?
To write the NeXT computer system software


Problem Set

6. Make an educated guess as to the most common syntax error in C programs.
- Semicolon (;) missing.
- Unmatched parentheses.
- Undeclared variables.
- Prototype function mismatch.

7. LISP began as a pure functional language but gradually acquired more and more imperative features. Why?
To increase its execution efficiency.

8. Describe in detail the two most important reasons, in your opinion, why Speedcoding did not became a very widely used language.
Speedcoding system was an interpreter so that the running time of a program that was written with the help of Speedcoding was usually ten to twenty times that of machine code.
Speedcoding interpreter took much memory to execute the program and it wasn't efficient.

14. What are the arguments both for and against the idea of a typeless language?
Typeless language is highly flexible for the programmer, any storage location can be used to store any type value.
Type checking can't be applied so the programmer has to make sure that the statements are correct.

15. Are there any nonprochedural programming languages other that Prolog?
No

16. What is your opinion of the argument that languages that are too complex are too dangerous to use, and we should therefore keep all languages small and simple?
Languages that are too complex and too dangerous must be avoided because they will be difficult to learn and they may cause so many errors because of the complexity. We should keep all languages small and simple so we can learn them fast and we know hot to use them specifically.

22. Explain two reasons why pure interpretation is an acceptable implementation method for several recent scripting languages.
- Pure interpretation is platform independent
- Interpretation gives the fastest turnaround from script to execution

24. Why, in your opinion, do new scripting languages appear more frequently than new compiled languages?
Because scripting languages usually are simpler and focused on specific applications.


Edited on 25/03/2013

1 comment:

  1. hiyou have a great blog and i am also a blogger

    http://comp1234.tk/

    ReplyDelete