CS 4402 Comparative Programming Languages Study

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

True/False: In imperative programming languages, the assignment statement is the only statement that does anything.

True

True/False: In syntactical analysis the top-down parsing approach is referred to LL analysis?

True

A variable of type byte will have what number of bits?

8

True/False: A bus with less bits has an advantage because it operates faster and can move more data.

False

True/False: All imperative programming languages support enumeration data types.

False

True/False: The type 2 hypervisor is designed to run directly on bare metal.

False

Which of the following image file formats was developed using a Little-Endian format?

GIF

Which of the following is a characteristic of a non-imperative programming language.

Is Referentially Transparent

Which of the following best describes a Type 1 hypervisor.

It runs on bare metal

Which of the following programming languages is an example of a programming language with strong type checking.

Java

What is the binary equivalent of decimal 25 in 2's complement?

00011001

Convert -32 into a 2's complement binary number:

11100000

Which option is the 2's complement of the following binary number: 00011100

11100100

Which of the following expressions can be evaluated as syntactically correct by the following grammar? E = N | E "+" E. N = "1" | "2" | "3" | "4" .

4 + 2 + 1

In the following example EBNF grammar, what does the symbol <expr> describe? <expr> := '-'? <digit>+ ('.' <digit>+)?<digit> := '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'

A real number

Which of the following is an example of a imperative programming language.

Algol

Which of the following is NOT one of the attributes of a variable.

All of these choices are attributes of a variable (scope, lifetime, r-value, Name)

Which of the following is NOT a function supported by debuggers?

Assemble code

Professors John G. Kemeny and Thomas E. Kurtz of Dartmouth University developed which language?

BASIC

Which of the following is NOT an example of a dynamic typed programming language?

C++

Which of the following computer systems used a Little-Endian architecture.

DEC Alpha

Dynamic binding occurs _______: Select the one best answer.

During execution

Which of the following is NOT one of the steps or 'phases' of the compilation process.

Error Checking

In the following BNF example, the symboil <sentence> is considered to be a terminal symbol? <sentence> := <subject> <predicate> <subject> := 'John' | ' Mary' <predicate> := 'eats' | 'talks'

False

True/False: A computer architecture that stores program instructions on an external device such as a tape or drum and not in memory is consistent with the von Neumann architecture?

False

True/False: A negative number is represented in 2's complement by a leading 0 bit followed by the binary representation of the value.

False

True/False: A variable of type long will require 16 bits of memory.

False

True/False: An advantage of the array is that is ensures that all values are always in sorted order.

False

True/False: An advantage to a weak typed programming language is that it eliminates type issues that can cause hard to find bugs in a program.

False

True/False: An array is comprised of a collection of elementary data types which can all be of different types.

False

True/False: Arrays are flexible data structures as the length of the array can be dynamically changed at any time.

False

True/False: Arrays are limited to having either one or two dimensions.

False

True/False: Assembler Language was developed before Machine Language.

False

True/False: In syntactical analysis the bottom-up parsing approach is referred to LL analysis?

False

True/False: Integer numbers include the set of all positive whole numbers and zero.

False

True/False: Java is an example of a functional programming language.

False

True/False: Java's unique design has achieved 100% portability.

False

True/False: One of the features of imperative programming languages is that the programmer specifies results and input but lets the compiler determine the computation steps necessary to solve the computing problem.

False

True/False: Real time, every time is a way of describing the role of a compiler as opposed to an interpreter.

False

True/False: The EBNF (or Extended BNF) approach to grammar specification was a rewrite of the original BNF developed by John Backus designed to 'normalize' grammar specification?

False

True/False: The Turing-Church Thesis states that any computing problem that cannot be solved with a Turning machine can be solved with Lambda Calculus.

False

True/False: The advantage of fixed-point numbers is that the accuracy, that is the absolute error, is variable.

False

True/False: The benefit of the C language was that it was high level and ensured that the user had no access to the lower level capabilities of assembly language eliminating the potential for many programming bugs.

False

True/False: The following operation in binary will generate the 2's complement binary equivalent of 128? 01111111 + 00000001

False

True/False: The high order byte refers to a byte with a value greater than 256.

False

True/False: The java compiler generates machine instructions for the target computing using a compiler program known as the JRE.

False

True/False: The loader compiles a program and performs type checking on it.

False

True/False: The model of computing introduced by Alonzo Church was known as the Church Thesis.

False

True/False: The revolutionary innovation that von Neumann introduced in his computer architecture was the use of registers within the Arithmetic Logic Unit.

False

True/False: The type char is always 8 bits in length.

False

True/False: Turing's concept of the turing machine was based upon the concepts and rules of mathematical functions.

False

True/False: Type checking is a part of the compilation process that occurs in step 2 syntax analysis.

False

The term compiler was coined in the 1950's by which of the following?

Grace Hooper

Which of the following is NOT a component of the von Neuman architecture?

Graphics Adapter

The C language was developed at Bell Laboratories by Dennis Ritchie during:

In the early 1970's along with Unix

The Fortran language was developed in 1957 by a team led by the following:

John Backus

Pascal was developed by which of the following:

Niklaus Wirth

Which of the following is an example of a dynamic typed programming language?

Perl

Which of the following is NOT a feature or characteristic of imperative programming languages.

Programming specifies the result not the steps

What feature of the von Neumann architecture was unique at the time and is an element of virtually every modern computer today?

Programs and data are stored in memory to facilitate general purpose computing.

Which of the following is NOT an example of an imperative programming language?

Prolog

The following are expressed in what format: 123. 45x10^3 1.2345x10^-8 0.00012345x10^7 12345000.0x10^4

Scientific Notation

The step in the compilation process where EBNF or BNF are used to determine if the structure of programming language statements are valid is called.

Syntactical analysis

The lexical analysis phase of the compilation process is also known as:

Tokenizing

Programming languages offer abstraction from the details of the computer hardware. This abstraction resulted in less programming effort but also some loss of 'detail' that could potentially result in less efficient code?

True

True/False: A compiler is a program that translates one language to another.

True

True/False: According to EBNF the | character means 'or'.

True

True/False: Algol has influenced programming language design more than any other single programming language?

True

True/False: An advantage to using an unsigned integer is that a larger positive number can be stored than can be stored with a signed integer.

True

True/False: An enumeration data type is an abstraction mechanism that allows labels such on/off or high, medium, and low to be associated with simple data types.

True

True/False: Big Endian architectures store the most significant byte first (which is the lowest memory address in the range) in memory.

True

True/False: Decimal numbers represented directly by assigning four bits to each decimal is callled binary-coded decimal (BCD).

True

True/False: In 'C', the char is essentially a small integer and supports the ability to readily convert between char and integer.

True

True/False: In a Turing machine the only operations that are possible on the ribbon are the read and write of one bit.

True

True/False: In a dynamic typed language the programmer is not required to declare and initialize variable before its use.

True

True/False: In imperative programming languages assignment is the core operation that is performed.

True

True/False: In many programming languages such as Java and 'C' the evaluation of an expression that employs operators such as greater than, less than, and, or and not (employing the proper syntax) returns a type of boolean.

True

True/False: In the von Neumann architecture, the bus describes the connections between the components in the architecture that is used to move data between them.

True

True/False: Lexical analysis is the step in the compilation process where tokens are extracted from the programming language statements.

True

True/False: Perl is an example of a static typed programming language.

True

True/False: The Assembler language was an early step towards abstraction that allowed programmers to use symbols for machine instructions and not binary numbers?

True

True/False: The IBM model of virtualization evolved from mainframe technology and was based upon the mapping of instructions from the virtual machine to physical machine.

True

True/False: The Unix virtual machine model implements virtualization through the use of process shells.

True

True/False: The design of the Java Virtual Machine is primarily intended to enhance the portability of Java applications.

True

True/False: The development of the C language is associated with the development of the Unix operating system?

True

True/False: The front end of a compiler is language-dependent and the back-end is computer dependent.

True

True/False: The string type is essentially implemented as an array of characters.

True

True/False: They key limitation of ASCII was that it could only represent 255 characters ?

True

True/False: Type checking will validate, strongly typed programming languages, that the type of an expression is consistent with the type of a target variable.

True

True/False: in Perl, the pragma 'strict' simulates static typing.

True

True/False: non-imperative languages are referentially transparent which means that a particular state is not required for successful and consistent computation.

True

The Cobol language was developed primarily for which of the following:

business data processing

Which of the following is NOT a component required to express a floating point number in binary using scientific notation.

fixed-point

Specific data elements in an array are accessed using an:

index

Which of the following cannot be dynamically bound:

language reserved keyword

The extensions to BNF were designed to provide a shorthand to simplify the grammar. The * symbol was one such extension used in EBNF and indicated:

something can be repeated any number of times (or be skipped altogether)

Consider the following grammar, which of the following is a non-terminal symbol? statement: whileStatement | ifStatement | '{' statementSequence '}' whileStatement: 'while' '(' expression ')' statement ifStatement: 'if' '(' expression ')' statement statementSequence: | statement ';' statementSequence expression:

statement

Which of the following is NOT an elementary data type.

string

The RECORD type is implemented in different ways in programming languages. Which option best describes the record implementation in 'C'.

struct

Consider the following grammar, which of the following is a terminal statement: whileStatement | ifStatement | '{' statementSequence '}' whileStatement: 'while' '(' expression ')' statement ifStatement: 'if' '(' expression ')' statement statementSequence: | statement ';' statementSequence expression:

while


Set pelajaran terkait

Medsurg DVT & Pulmonary Embolus Quiz

View Set

U.S. History Semester 1 Final Exam Review

View Set

Chapters 5-7 Macroeconomics Homework

View Set

Chapter 4: Activity- Based Costing

View Set

The Declaration of Independence Grievances

View Set

ASD and PTSD Psych Exam 2 IPAP 3 16

View Set