0% found this document useful (0 votes)
122 views2 pages

Principle of Compiler Question and Answer

The document discusses various programming language concepts and principles: - User-defined data types were introduced in ALGOL 68 but are often credited to Pascal. - The original version of Perl was meant to replace the sh and awk languages. - C++ includes C's unsafe features to maintain backwards compatibility and have little performance penalty relative to C. - Block structure first appeared in ALGOL 60.

Uploaded by

Syafiqa Roslan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
122 views2 pages

Principle of Compiler Question and Answer

The document discusses various programming language concepts and principles: - User-defined data types were introduced in ALGOL 68 but are often credited to Pascal. - The original version of Perl was meant to replace the sh and awk languages. - C++ includes C's unsafe features to maintain backwards compatibility and have little performance penalty relative to C. - Block structure first appeared in ALGOL 60.

Uploaded by

Syafiqa Roslan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Principle of compiler

31) What innovation of data structuring was introduced in ALGOL 68 but is often credited to Pascal?

A: Innovation of data structuring was introduced in ALGOL 68 but it is often credited to Pascal is
user-defined data types.

53) what two languages was original version of Perl meant to replace?

A: Perl language was originally a combination of sh and awk language.

43) Why does C++ include the features of C that are known to be unsafe?

A: Most C programs are backwards compatible with C++.


A secondimportant goal was that there should be little or no performance penalty

relative to C. A third goal of C with Classes was that it could be used for every

application for which C could be used, so virtually none of the features of C would

be removed, not even those considered to be unsafe.

19) In what version of ALGOL did block structure appear?

A: ALGOL 60

59) What characteristic of Ruby’s arithmetic operators makes them unique among those of other
language?

A: All operations are called via method calls

54) For what application area is JavaScript most widely used?

A: Web browsers

27) Why was BASIC an important language in early 1980s?

A: BASIC was very popular on microcomputers in the late 1970s and early 1980s because the
characteristics of early BASIC that are easy for beginners to learn, especially for those who were not
science oriented, and its smaller dialects can be implemented on computers with very small
memories.

67) What element of the JSTL is related to subprogram?


A: Servlet and JSP.

16) In what way are Scheme and Common LISP opposites of each other?

A: Common LISP allows for static scoping and dynamic scoping Scheme only uses static scoping.
Scheme is relatively small while Common LISP is large and complex.

31) What innovation of data structuring was introduced in ALGOL 68 but is often credit to PASCAL?

A: User-defined data types.

Problem set:

22) Explain two reasons why pure interpretation is an acceptable implementation method for
several recent scripting languages.

A: One situation in which pure interpretation is acceptable for scripting languages is when the
amount of computation is small, for which the processing time will be negligible. Another situation is
when the amount of computation is relatively small and it is done in an interactive environment,
where the processor is often idle because of the slow speed of human interactions.

18) Languages continually evolve. What sort of restrictions do you think are appropriate for changes
in programming languages? Compare your answers with the evolution of Fortran.

A: A good deal of restraint must be used in revising programming languages. The greatest danger is
that the revision process will continually add new features, so that the language grows more and
more complex. Compounding the problem is the reluctance, because of existing software, to remove
obsolete features.

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?

You might also like