CSCI 374

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Which of the following is not a scripting language?

C++

In which language do all data declarations in a function, except those in nested blocks, appear at the beginning of the function?

C89

Which of the following is true about Orthogonality?

Every possible combination of primitives is legal and meaningful.

Which version of FORTRAN included If with an optional Else clause?

Fortran 77

Garbage Collection supported by Java is a process which

Frees the programmer from needing to delete objects explicitly when they are no longer needed.

A lost heap-dynamic variable is also called

Garbage

What is a disadvantage of dynamic scoping?

It makes a program dicult to read.

Why is ambiguity a problem of language structures?

It makes the meaning of structure within the language non unique.

Which of the following is an advantage of Dynamic Type Binding?

It oers a high degree of exibility in programming.

The largest impact of Pascal was

It was used to teach programming from 1971-1990s in colleges and universities.

What is true about Java programs

Its designers traded execution efficiency for reliability

How do Context Free and Attribute Grammars differ?

One is G = (S, N, T), the other is G = (S, N, T, P)

Name the rst programming language that fully supported Object Oriented Programming.

Smalltalk

One common feature of APL and SNOBOL is

Storage is allocated to a variable when it is assigned a value i.e. dynamic storage allocation.

The evolution of programming design methodology is as follows

Structured programming -> Data oriented programming -> Object oriented programming

JSP is a Mark-up programming hybrid language used to

Support dynamic Web documents and provide other processing needs of Web documents.

C#, JavaScript, Ruby and Python all provide support for this particular feature found in Functional Programming Languages:

Support for nameless functions.

The study of languages can be divided into what?

Syntax and semantics

What is the main distinction between syntax analysis and lexical analysis?

Syntax is modeled as a stack machine whereas lexical is modeled as a finite state machine

Which new feature was incorporated in ALGOL 60 that was not available in ALGOL 58?

The concept of block structure was introduced.

Referential transparency refers to what?

The execution of a function always produces the same result when give the same parameters.

Which of these is true of the Von-Neumann architecture?

The execution of machine code occurs in a process called the fetch-execute cycle

If a function is called tail recursive then?

The last statement within the function is a recursive call to the function itself.

A Lexeme is?

The lowest level syntactic unit of a language.

Consider the following Java statement: index = 50 * count + 170; Which of the following is true regarding this statement?

The tokens are: identifier, equal_sign, int_literal, mult_op, identifier, plus_op, int_literal and semicolon.

What is true about mark-up languages?

They are also called programming hybrid languages

Which of the following properties are similar for Java and C++?

They both have classes and primitive types.

Which of the following is not a characteristic of Purely Functional Programming Language?

They do not always produce the same results when executing the same function with the same parameters.

ALGOL 60 was the result of eorts...

To design a universal programming language for scientic applications.

What is the main reason Extended BNF was created?

To enhance the readability and writeability of BNF.

The class of automata/machine associated with the set of all computable functions is:

Turing machine

Which activity ensures that the operands of an operator are of compatible types?

Type-checking

Data-oriented program design methodology focuses on

Use of abstract data types

When would you use a functional programming language over an imperative one?

When the nature of the underlying problem being solved is an underlying mathematical one.

When is a grammar said to be ambiguous?

When there are two or more distinct parse trees.

An example of a markup language would be

XSLT

Which of the following is the correct representation of indexing(subscripting) an array?

array_name(subscript_value_list)->element

Consider the grammar: <S>→<A> a <B> b <A>→<A> b | a <B>→ a <B> | a Which one of the following sentences is not in the language generated by this grammar?

baaab

State the correct algorithm for the fetch-execute cycle

repeat forever fetch the instruction pointed by the counter increment the counter decode the instruction execute the instruction end repeat repeat forever

According to the textbook finite automata are:

A class of mathematical machines that can be used for lexical analyzers whose representation can be realized as state diagrams.

An attribute grammar is what?

A device used to describe more of the structure of a programming language than can be described with a context-free grammar.

What is a higher order function?

A function that can take one or more functions as parameters or returns a function as a result, or both.

Which factor/s contributes towards increasing cost of a programming language?

A language having expensive implementation system and not portable

What is a Functional Programming Language?

A language that is designed to mimic mathematical functions to the greatest extent possible

In what common data structure are LISP lists normally stored?

A linked list structure in which each node has two pointers.

What does a lambda expression specify?

A nameless function that performs some behavior.

What is the relationship between Lexemes and tokens?

A token is a category of lexemes.

The concept of using Blocks which allows static scope inside program units was introduced in which language?

ALGOL 60

The rst language to provide a discriminated union was.

ALGOL 68

Exception handling is

Ability of a program to intercept run-time errors, take corrective measures and continue

If two variable names can be used to access the same memory location, what are they are called?

Aliases

The most common data structures in the field of scientific applications of programming languages was

Arrays and matrices

What data type(s) were parts of the original LISP?

Atoms and lists

What is a heap-dynamic array?

Binding of subscript ranges and storage allocation is dynamic and can change any number of times during the arrays lifetime.

A language that is writable but not reliable because of its flexibility in pointer usage is

C++

Name the rst programming language whose use was mandated by the Department of Defense.

COBOL

The first successful high level language for business was

COBOL

Which of these is true about inheritance

It enhances the potential re-use of existing software

Consider the grammar: <S>→<A> a <B> b <A>→<A> b | a <B>→ a <B> | a Which of the following is a true statement about this grammar?

It generates a language where sentences begin with a and end with b.

The reason for studying concepts of programming languages are

It helps a programmer to learn several other languages.

What is a reserved word?

It is a special word that cannot be used as a user-de ned name.

What are unions?

It is a type whose variables are allowed to store dierent type values at dierent times during execution

What is a variable?

It is an abstraction of a memory cell or collection of memory cells.

What is an associative array?

It is an unordered collection of data elements indexed by an equal number of keys.

Which of the following is an advantage of using a static variable?

It is very ecient. All addressing is direct and no run-time overhead is incurred.

Which kind of array can have rows with varying number of elements?

Jagged Array

Which language does not support unions?

Java

Which of the following is considered a functional programming language?

LISP

Machine code was replaced by Assembly language because.

Machine code was tedious and error prone

Which one of the following is NOT a reason to separate syntax analysis and lexical analysis when considering syntax analyzers?

Makes unambiguous grammar.

APL is a programming language that provides

Many powerful operators

According to the textbook languages that can be used to describe other languages are?

Metalanguages

Associative arrays in Perl (Hashes) begin with which sign?

%

What does the following expression in Scheme evaluate to (- 5 (* 6 3))?

-13

Consider the following BNF grammar: <S> → <A> | b <A> → a | b<A> How many function calls to <A> would be made when using a recursive decent parser for the sentence bba?

3

How many characters could a variable name in FORTRAN I have?

6

In Ruby class variable begins with which sign?

@@

All functional programing languages are?

Compiled and/or interpreted varies with the languages.

BNF has the same expressive power as:

Context Free Grammar

SIMULA 67 works with coroutines. What is a coroutine?

Controls allowing subprograms to restart at the position where they previously stopped.

How do Functional Programming languages handle I/O?

Input and output operations change the state a program and therefore cannot be part of any pure functional programming language.

PL/I represents the rst large scale attempt to design a language that could be used for a broad spectrum of application areas. Which of the following was a contribution of PL/I ?

Detect and handle 23 dierent types of exceptions or run-time errors.

Which of the following was NOT incorporated in the design goals of BASIC

Dicult and meant only for science students to learn and use.

What was the type of scoping used in the original LISP?

Dynamic

What is the difference between EQV? And EQ? In Scheme?

EQV? tests for the equality of two atoms without knowing whether they are symbolic or numeric whereas EQ? compares the pointer values.

What function is available in Scheme that can be called to interpret Scheme code?

EVAL

Which of the following is FALSE regarding BNF grammars?

Extended BNF (EBNF) notation allows language descriptions that cannot be specified in BNF alone.

The cockroach of programing languages is:

Fortran

Which version of FORTRAN added support for object oriented programming?

Fortran 2003

Speedcoding was an interpretive system developed by John Backus for which of the following?

IBM 701

When do we call static binding?

If it rst occurs before run time and remains unchanged throughout program execution.

Lists in Lisp are specified using:

Parentheses

In the compilation process, which of the following represent the syntactic structure of the program

Parse trees

Which of the following is FALSE regarding Axiomatic Semantics?

Preconditions and postconditions do not relate to a statement in Axiomatic Semantics.

Aliasing means

Presence of two or more distinct referencing methods for the same memory location

What is the von Neumann bottleneck about

Program instructions often can be executed much faster than the speed of the connection

Which of these is a functional programming language and has only two data types: atoms and lists?

Pure Lisp

Which of the following is not true regarding the original Scheme programming language mentioned in the Text Book?

Scheme like LISP before it uses dynamic scoping.

When would you prefer pure interpretation of programs

Small programs where efficiency can be neglected

The Apply-to-All Functional Form is achieved in Scheme by using the following keyword:

map


Set pelajaran terkait

Appendicular Region - Systemic Worksheets

View Set

Geography Alive- Chapter 35 Antarctica: Researching Global Warming at the Coldest Place on Earth

View Set

Chapter 1: Contract Law, Producers and Types of Insurers

View Set

Module 53 - Evaluating Psychotherapies

View Set

Chapter 32 Obstetric & Gynecological Emergencies Pre-Test

View Set