Languages

¡Supera tus tareas y exámenes ahora con Quizwiz!

What elements will the Perl language @a array consist of? $_ = ' a b c ';my @a = split(); Select one: a. ' ', 'a', ' ', 'b', ' ', 'c', ' ' b. undef, 'a', 'b', 'c', undef c. 'a', 'b', 'c' d. ' ', 'a', 'b', 'c'

'a', 'b', 'c'

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

00011001

What will the output of the following code be? c=1; switch (c) { case 1: print '1'; case 2: print '2'; break; case 3: print '3'; break; }

1 2

Convert -32 into a 2's complement binary number: Select one: a.11100000 b.00100000 c.01000000 d.11011111

11100000

Which option is the 2's complement of the following binary number: 00011100 Select one: a.11100100 b.01111100 c.10011100 d.None of these answers

11100100

The output of the following Haskell code will be which of the following options when fac is called with an argument of 5. fac :: Integer -> Integerfac n | n == 0 = 0fac n | n > 0 = n+fac(n-1)

15

What output will the following segment of Perl code produce? my @a = (0, 1, 2);my $b = @a;print $b;

3

When Perl evaluates $expr = 1 + 2 * 3 - 4 the value of $expr will contain: Select one: a. 5 b. -3 c. 3 d. None of these answers

3

When Perl evaluates $expr = 1 + 2 * 3 - 4 the value of $expr will contain:

3

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

Consider the following code segment: for (int k=0; k<20; k=k+2) { if (k%3 == 1) System.out.print(k+" "); } What is printed when this code is executed?

4 10 16

In the following code, what are the contents of the argument? boomBangs [7..13] Select one: a. 7 and 13 b. 7,8,9,10,11,12, and 13 c. The numbers between 7 and 13 (8,9,10,11,12) d. None of these responses

7,8,9,10,11,12, and 13

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

8

In the following code, what data type is the function returning? quicksort :: (Ord a) => [a] -> [a] quicksort [] = [] quicksort (x:xs) = let smallerSorted = quicksort (filter (<=x) xs) biggerSorted = quicksort (filter (>x) xs) in smallerSorted ++ [x] ++ biggerSorted Select one: a. A list of integers b. The empty list c. A list of elements with the generic type a d. An integer value

A list of elements with the generic type a

The map function in a functional programming language such as Haskell will: Select one: a. Apply a function to every element of the input list. b. Apply each argument of a list to the specified function such that each function returns a function that takes the next element in the list as argument c. Filter each item of an input list using the map function to evaluate each input item as true or false d. None of these answers

Apply a function to every element of the input list.

The map function in a functional programming language such as Haskell will: Select one: a. Apply a function to every element of the input list. b. Apply each argument of a list to the specified function such that each function returns a function that takes the next element in the list as argument c. Filter each item of an input list using the map function to evaluate each input item as true or false d. None of these answers

Apply a function to every element of the input list.

Which of the following is NOT a function supported by debuggers? Select one: a.Tracing b.Breakpoints c.Examine/modify data d.Assemble code

Assemble code

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

BASIC

Which of the following computer systems used a Little-Endian architecture. Select one: a.DEC Alpha b.Java virtual machine c.Sun SPARC d.MIPS

DEC Alpha

A programming language is said to support object oriented programming if it includes all of the following constructs EXCEPT: Select one: a. Encapsulation and data abstraction b. Inheritance c. Dynamic polymorphism d. Data Abstraction

Data Abstraction

In Perl, a scalar variable can hold: Select one: a. 256 characters b. 1024 characters c. 32768 characters d. Depends on system specifications

Depends on system specifications

The ability to select the appropriate subprogram at run-time based upon an evaluation of types is known as? (NOTE: there are 4 possible answers and you can specify any of the 4).

Dynamic Polymorphism

When the proper method is selected during run-time and executed, this represents an example of: Select one: a. Static Polymorphism b. Dynamic Polymorphism c. early binding d. static dispatching

Dynamic Polymorphism

True/False: A superclass contains all of the attributes and behaviors of its subclasses.

False

True/False: Actual parameters can only be specified as variables

False

True/False: The following segment of JavaScript code is valid. if (how == "reverse") { parent.page1.location.href="page2.html" } else { parent.page2.location.href="page2.html" }

False

True/False: The semantics in which the address of a variable is bound to the name of the formal parameter variable is known as copy-in semantics or call-by-value.

False

In a functional programming language such as Haskell or Standard ML select the most accurate statement from the following list of statements. Select one: a. Functions can process only 1 piece of information. b. Functions can take only 1 argument which can be a primitive data type or a compound data type. c. A function must take in (argument) and return the same data type. d. Functions can take in any number of arguments but return only 1.

Functions can take only 1 argument which can be a primitive data type or a compound data type.

Which of the following is NOT a component of a subprogram? Select one: a. A declaration which defines the interface to the subprogram b. Local declarations which are accessible only within the body of the subprogram c. A sequence of executable statements d. Global variables that can be used within the subprogram

Global variables that can be used within the subprogram

Which of the following is NOT an example of a scripting language? Select one: a. Perl b. Python c. Rexx d. Haskell

Haskell

Which of the following is NOT a valid prolog atom? Select one: a. f b. 'Hello' c. <---+---> d. Hello

Hello

The C language was developed at Bell Laboratories by Dennis Ritchie during: Select one: a.The late 1950's b.The early 1960's c.At the same time as Pascal d.In the early 1970's along with Unix

In the early 1970's along with Unix

The abstraction of data and the implementation of behaviors in object oriented programming is known as: Select one: a. Polymorphism b. Information Encapsulation c. Information Hiding d. Implementation Abstraction

Information Hiding

Which of the following is a characteristic of a non-imperative programming language. Select one: a.Based upon assignment and state b.Programmer determines the steps of computing c.Suffers from side effects d.Is Referentially Transparent

Is Referentially Transparent

Which of the following best describes a Type 1 hypervisor. Select one: a.It runs as a process within the the operating system. b.It generates an idealized computer that programs are developed for c.It runs on bare metal d.It generates the shells within the Unix operating system

It runs on bare metal

What can we say about the following Haskell function definition: reverse :: [a] -> [a]reverse x | x==0 = 0 | x>0 = reverse[x-1] Please select the best answer. Select one: a. It will recursively count down the value of a to 0. b. The function will take in a argument of type a and return an argument of type a c. It will not compile because the compiler will not allow a generic type (a) when integer operations are being used. d. The routine can pattern match both integers and floating point numbers.

It will not compile because the compiler will not allow a generic type (a) when integer operations are being used.

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

John Backus

The Tool Command Language with the widget Toolkit (Tcl/Tk) was developed by ______. Select one: a. John Ousterhout b. Bjarne Stroustrup c. Larry Wall d. Guido van Rossum

John Ousterhout

Pascal was developed by which of the following:

Niklaus Wirth

What feature of the von Neumann architecture was unique at the time and is an element of virtually every modern computer today? Select one: a. Programs and data are stored in memory to facilitate general purpose computing. b. The use of a bus to move data between the components of the architecture c. The use of registers in the arithmetic logic unit d. The introduction of a control unit

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

which of the following NOT an example of an imperative programming language? a) Cobol b) Java c) Prolog d) Fortran

Prolog

Select the best response that describes how Prolog will evaluate the following Prolog expression. 3 = 2+1. Select one: a. Prolog will evaluate to true, but will not report the result. b. Prolog will not evaluate to true because there is no variable. c. Prolog will evaluate to false because the = sign is a test of Unifiability not mathematical equality d. Prolog will evaluate to false because mathematical evaluations must be performed within a function

Prolog will evaluate to false because the = sign is a test of Unifiability not mathematical equality

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. Select one: a.Syntactical analysis b.Lexical analysis c.Type Checking d.Semantic Analysis

Syntactical analysis

The expression {4,8} will match: Select one: a. The numbers 4,5,6,7,8 b. Numbers between 4 and 8 (5,6,7) c. Numbers 4 and 8 d. Doesn't match numbers but positions 4-8 in a string.

The numbers 4, 5, 6, 7, 8

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

True

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

True

True/False: the scope of a variable refers to the domain where a specific binding refers to the same location in memory

True

What relationship does the following Prolog program represent. r(X, Y) :- parent(Z,X). parent(Z,Y). male(X). X \= Y. Select one: a. X is the father of Y b. X is the brother of Y c. Y is the sister of X. d. X and Y are NOT related.

X is the brother of Y

What would the output of the following Prolog query be? ?- f(a,b) = f(Y,X). Select one: a. X=b. Y=a. b. This expression will not compile c. X=a. Y=b. d. X=X. Y=Y.

X=b. Y=a

In Haskell, the following code demonstrates what feature of functional programming: (max 4) 5 Select one: a. A curried function b. A recursive function c. Mapping d. Filtering

a curried function

Assuming the source text below, what will the following regular expression (in red) match to? ..stage Source Text: All the world's a stage, And all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts... Select one: a. stage b. _stage c. a stage d. No matches

a stage

Which of the following is NOT a valid variable in Prolog. Select one: a. Paul b. a_123 c. _123 d. Hello

a_123

In the following code segment, the variable B is an: int B=1;int Z;Z = myfunc(B);intmyFunc( int A ) {return (A+1);} Select one: a. Formal Parameter b. Actual Parameter c. Return Type d. Local Variabe

actual parameter

Which of the following is an example of a imperative programming language. Select one: a.Standard ML b.Haskell c.Prolog d.Algol

algol

Which of the following is NOT one of the attributes of a variable. a) scope b) lifetime c) r-value d) name e) all of these choices are attributes of a variable

all of these choices are attributes of a variable

What will the following regular expresssion match to? ([\w]+[-._+&])*[\w]+@([-\w]+[.])+[a-zA-Z]{2,6} Select one: a. A strong password b. A phone number c. An email address d. The URL of a web site

an email address

The following code segment is an example of: void f() { ... g() ... } void g() { ... f() ... }

an indirect recursive call

All of the following represent which Prolog data type? elephant b a X 'Hello'

atom

In the following code segment, the statement if (k < 0) return; is called the what? void badPrint2( int k ) { if (k < 0) return; System.out.println(k); badPrint2( k+1 ); }

base case

Recursion is important in functional programming. Recursion implements the idea of divide and conquer where a problem is divided into smaller problems until the smallest possible case is found. This smallest case is called ____

base case

The association between two things such as a name and the thing it names is called a: Select one: a. variable b.binding c.scope d.typing

binding

The Cobol language was developed primarily for which of the following: Select one: a.Scientific Programming b.Education and Training in Computer Science c.business data processing d.reporting applications

business data processing

Which of the following is NOT an example of a dynamic typed programming language? Select one: a.C++ b.Perl c.PHP d.Python

c++

The unit of encapsulation and abstraction in object oriented programming that defines data types and subprogram declarations is called a? Select one: a. object b. application programming interface c. class d. interface

class

A programming language is said to support object oriented programming if it includes all of the following constructs EXCEPT: Select one: a. Encapsulation and data abstraction b. Inheritance c. Dynamic polymorphism d. Data Abstraction

data abstraction

The class that inherits attributes and behaviors from the base class is called the: Select one: a. super class b. derived class c. abstract class d. concrete class

derived class

The following code segment is an example of: void f() { ... f() ... } Select one: a. direct recursive call b. indirect recursive call c. an Iterative program d. an Object instantiation

direct recursive call

Dynamic binding occurs _______: Select the one best answer. Select one: a.During translation b.During type checking c.Only during loading d.During execution

during execution

Which of the following is NOT one of the steps or 'phases' of the compilation process. Select one: a.Code Generation b.Syntax Analysis c.Lexical Analysis d.Error Checking

error checking

In Prolog the following statement is called a ____ rainy(asheville).

fact

Assume that the following Prolog program has been consulted. a(B,B). Determine the output of the following query and enter in the answer blank. ?- a(1,X), a(X,Y), (Y,Z), a(Z,100).

false

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 bus with less bits has an advantage because it operates faster and can move more data.

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 derived class is limited to the characteristics and behaviors inherited from the base class.

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 superclass contains all of the attributes and behaviors of its subclasses.

false

True/False: A tuple in functional programing is any pair of items passed into a function.

false

True/False: A tuple in functional programing is any pair of items passed into a function.

false

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

false

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

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 algorithm can often be implemented with either recursion or iteration, however recursion is typically faster.

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 Java, the programmer is responsible for initiating the garbage collection process when an object has been de-referenced.

false

True/False: In dynamic polymorphism, the appropriate type / method is selected during the compile process.

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: Perl was originally developed by Linus Trovalds as a scripting language for Windows.

false

True/False: Python is an older language than either Tcl/Tk and Perl.

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: Statically bound variables can be used as arguments in recursive functions.

false

True/False: Subprograms that return a value are called procedures.

false

True/False: The Instantiation of an object uses memory that was pre-allocated for the program.

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 ability of the compiler to select, at compile time, the most appropriate data type or method to use based upon data type is known as dynamic polymorphism?

false

True/False: The ability to 'share' replicated expressions to avoid needless computations is known as eagar evaluation.

false

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

false

True/False: The advantage of lists in functional programming languages is that they can be used to pass in any number of data items with multiple data types.

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 management of variables is a constant concern and source of complexity for functionality programming languages.

false

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

false

True/False: The r-value refers to the location or reference.

false

True/False: The semantics of a procedure call are as follows: the current sequence of instructions are executed in parallel; the sequence of instructions within the procedure body is executed; upon completing the procedure body, the procedure is garbage collected.

false

True/False: The statement x+=1; below is binding the variable x. int x;x=1;x+=1;

false

True/False: The switch/case statement is an example of the sequence structure implemented within a programming language?

false

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

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

True/False: Using recursion always makes your code faster.

false

True/False: a subprogram is an object within a program that can be invoked from elsewhere within the 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: binding refers only to variables. The association of a function name or the output of an expression is not a binding.

false

True/False: the EBNF approach to grammar specification was a rewrite of the original BNF developed by John Backus designed to normalize grammar specification?

false

True/False: the revolutionary innovation that von Neumann introduced in his computer architecture was the use of registers within the ALU

false

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

false

True/Flase: For complex computations functions may be specified to return multiple values.

false

Which of the following is NOT a component required to express a floating point number in binary using scientific notation. Select one: a.Mantissa b.Sign c.Exponent d.fixed-point

fixed-point

In the following code segment, the variable A is a: int B=1;int Z;Z = myfunc(B);int myFunc( int A ) {return (A+1);} Select one: a. Formal parameter b. Actual Parameter c. Return Type d. Global variable

formal parameter

In functional programming, a higher order function is a function that returns a ____

function

In the following segment of Prolog code, 'father' is called ___ father(jim, mary).

functor

In scripting languages, memory management is done by a ___ and not by the programmer.

garbage collector

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

gif

The term compiler was coined in the 1950's by which of the following? Select one: a.Grace Hopper b.Alan Turing c.John von Neumann d.John Backus

grace hopper

Which of the following is NOT a component of the von Neuman architecture? Select one: a.Central Arithmetic or Arithmetic Logic Unit b.Memory c.Control Unit d.Graphics Adapter

graphics adapter

In Prolog an expression of the following format is known as a ________. H ←B1, B2,..., Bn

horn clause

In Perl, to test if the variable $str contains the word "abc" you would use: Select one: a. if ($str = ~/abc/) b. if ($str == "abc") c. if ($str = "abc") d. if ($str contains "abc")

if ($str = ~/abc/)

The output of compilation is code generation which typically translates a language construct into assembly language and from there into machine executable code. What language construct was the following segment of assembler code generated from? compute R1,expression jump.eq R1,L1 statement-1 jump L2 L1: statement-2 L2:

if statement

Specific data elements in an array are accessed using an: a) index b) hash c) key d) pointer

index

The abstraction of data and the implementation of behaviors in object oriented programming is known as:

information hiding

When an object is created from a class, we refer to it as ___ of the class?

instance

Which of the following programming languages is an example of a programming language with strong type checking. Select one: a.Java b.Perl c.PHP d.Shell script

java

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

john backus

Which of the following cannot be dynamically bound: Select one: a.variable b.function c.expression d.language reserved keyword

language reserved keyword

A software object's behavior is exposed through its ____?

method

Is the following Haskell code valid? Select the most accurate response. circumference :: [a] -> [a] circumference r = 2 * pi * r Select one: a. Yes this code will compile and execute correctly b. No. The function cannot process a list c. No. A generic data type cannot be used because of the mathematical evaluation within the function d. No. Neither the use of a list or a generic data type is valid. An explicit declaration of the appropriate data type is required.

no. neither the use of a list or a generic data type is valid. An explicit declaration of the appropriate data type is required

Which of the following is NOT a programming structure? Select one: a. sequence b. selection c. object oriented programming d. repetition

object oriented programming

Which of the following cannot be named: Select one: a. values b. classes c. functions d. operators

operators

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

perl

Which of the following is an example of a dynamic typed programming language? Select one: a.Perl b.C c.Pascal d.Java

perl

Assuming the source text below, what will the following regular expression (in red) match to? [ ]\w{7,7}[.] Source Text: All the world's a stage, And all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts...

players.

which of the following is NOT a characteristic of imperative programming languages? a) not referentially transparent b) programming specifies the result not the steps c) based upon the assignment d) is dependent on state

programming specifies the result not the steps

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

prolog

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' Select one: a.An Integer b.A real number c.A character d.A string

real number

The following code is an example of what functional programming language concept: (f(x)+f(x))-f(x) is equivalent to 2(f(x))-f(x) Select one: a. referential transparency b. polymorphism c. the multiplicative property d. type mapping

referential transparency

The following code is an example of what functional programming language concept: (f(x)+f(x))-f(x) is equivalent to 2(f(x))-f(x) Select one: a. referential transparency b. polymorphism c. the multiplicative property d. type mapping

referential transparency

Which of the following is NOT an advantage of Generics? Select one: a. Reusability b. Writeability c. Maintainability d. Reliability

reliability

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: Select one: a.something can be repeated any number of times (or be skipped altogether) b.something can appear one or more times c.something could occur only 1 time d.a range of items such as digits or letters

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

Real world objects contain what two things? Select one: a. state and behavior b. methods and attributes c. variables and behaviors d. instances and allocations

state and behavior

Consider the following grammar, which of the following is a non-terminal symbol?statement: whileStatement | ifStatement | '{' statementSequence '}'whileStatement: 'while' '(' expression ')' statementifStatement: 'if' '(' expression ')' statementstatementSequence: | statement ';' statementSequenceexpression: Select one: a.( b.if c.while d.statement

statement

Which of the following is NOT cloned when a recursive call is made? Select one: a. Code b. Local variables c. Parameters d. Static variables in the program

static variables in the program

Which of the following is NOT an elementary data type. Select one: a.integer b.boolean c.character d.string

string

The following segment of code in Python will produce an error. This indicates that Python tends to be more:print 1+"1" Select one: a. strongly typed b. weakly typed c. statically scoped d. dynamically compiled

strongly typed

The RECORD type is implemented in different ways in programming languages. Which option best describes the record implementation in 'C'. Select one: a.struct b.field c.component d.member

struct

What type of programming approach represents the combination of imperative programming with subprograms? Select one: a. structured programming b. symbolic programming c. sequential programming d. procedural programming

structured programming

The functional programming technique that optimizes away recursive calls such that only a single run-time stack frame is required is called. Select one: a. tail recursion b. head recursion c. lazy evaluation d. normal order execution

tail recursion

Which of the following is NOT an example of a markup language? Select one: a. HTML b. SGML c. XML d. Tex e. Tcl

tcl

Which of the following is NOT an example of a system programming language? Select one: a. Algol b. PL/1 c. Pascal d. Tcl

tcl

The correct looping statement to use when the number of iterations is known is: a. The for loop b. The while loop c. The do .. while loop d. None of these answers

the for loop

The lexical analysis phase of the compilation process is also known as: Select one: a.Tokenizing b.Optimization c.Preprocessing d.Assembling

tokenizing

Given the following Prolog program: member(X, [X|Xs]).member(X, [Y|Ys]) :- member(X, Ys). How will Prolog evaluate the following query? ?- member(a, [b,c,a,d]).

true

In Perl, given the following code, the statement if($var) will evaluate to: $var = "False"

true

True / False: A curried function is a function that takes in and applies its arguments one at a time.

true

True / False: The Filter function takes in a 'test' and a list, applies the 'test' to every element in the list and returns a list containing every element in the list that satisfied the test.

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 algorithm can often be implemented with either recursion or iteration, however iteration typically takes less memory

true

True/False: An algorithm can often be implemented with either recursion or iteration, however iteration typically takes less memory.

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: An object can inherit data members and functions from one or more based classes.

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: Early binding supports compilation, late binding supports interpreters.

true

True/False: Functional Programming Languages were designed to mimic mathematical functions.

true

True/False: Garbage collection is the process of 'deconstructing' objects to release the memory back to the system

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 Prolog the term Resolution describes the process of evaluating all of the elements of an expression to determine if the entire expression evaluate to true or false.

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 imperative programming languages, the assignment statement is the only statement that does anything.

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 object oriented programming languages such as Java, polymorphism refers to the ability of a class to have more than one method of the same name where the appropriate method is invoked based upon the number and type of arguments and/or the return type.

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: Loop statements are the most difficult statements to program.

true

True/False: Most scripting languages are interpreted.

true

True/False: Python is a programming language that has the diverse characteristics of being interpreted, byte-compiled, interactive, and object-oriented.

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 Scope of a variable refers to the domain where a specific binding refers to the same location in memory.

true

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

true

True/False: The basic regular expression is pattern matching?

true

True/False: The following code segment represents a valid declaration of a variable in JavaScript. var KeepVar;

true

True/False: The following expression in Prolog is valid. ?- loves(mary,john) = loves(John,Mary).

true

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

true

True/False: The main purpose of an abstract class is to be inherited by other classes.

true

True/False: The object of a derived class can perform all the tasks that an object of base class can perform.

true

True/False: The real disadvantage of call-by-reference is that the mechanism is inherently unsafe.

true

True/False: The scope of a binding is the part of the program (textually) in which the binding is active.

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: in syntactical analysis the top-down approach is referred to LL analysis?

true

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

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 development of the C language is associated with the development of the Unix operating system?

true

The following segment of code in Perl produces the ouput 2. This indicates that Perl is:print 1+"1" Select one: a. weakly typed b. strongly typed c. dynamically scoped d. compiled

weakly typed

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

while

The ___ statement implements a pre-test loop that is used when the number of iterations is NOT known.

while

Given the following Prolog program: member(X, [X|Xs]).member(X, [Y|Ys]) :- member(X, Ys). How will Prolog evaluate the following query? ?- member(X, [b,c,a,d]).

x=b


Conjuntos de estudio relacionados

Psy 134 Lecture 6 - Tolerance, Sensitization, and Withdrawal

View Set

Chapter 8 - Principles of Exercise Training

View Set

Ch. 24 Liability, Defenses, & Discharge

View Set

Unit two study guide; study guide

View Set

2.5 Monetary Polices: Interest rates

View Set

Chapter 4: Stress Response Multiple choice

View Set