CS 4337 Exam 1 Review

studied byStudied by 0 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 88

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

89 Terms

1

False

An advantage of using a compiler is that it generally produces portable code able to fun on many different hardware and software platforms.

New cards
2

block statement

What innovation introduced in ALGOL68 is often credited to Pascal?

New cards
3

False

Most programming languages are implemented as interpreters these days.

New cards
4

Easy development

From the point of view of the programmer what are the major advantages of using a high-level language rather than internal machine code or assembler language?

New cards
5

True

Python is interpreted.

New cards
6

Encapsulation, Inheritance, Polymorphism

Which of the following mechanisms is/are provided by Object Oriented Language to implement Object Oriented Model?

New cards
7

Reduce complexity

Which of the following is the functionality of 'Data Abstraction'?

New cards
8

Algol

Which PL is considered an ancestor to C, Java, and Ruby?

New cards
9

Logic Programming

Prolog comes under ___________

New cards
10

functional-oriented

Scala is part of the: ____?

New cards
11

True

The "Von Neumann" computer architecture is characterized by hardware that has a CPU separate from memory, which is used to hold both data and programs.

New cards
12

FORTRAN

Programming language which is used for scientific purposes in batches is

New cards
13

Byte code

_______________ is the assembly language for an imaginary architecture.

New cards
14

False

Markup languages are general purpose programming languages.

New cards
15

List Processing

Lisp is the second oldest high level programming language. Here Lisp stands for

New cards
16

add comments to it

To made program more easier to understand, programmers can

New cards
17

False

C has strong type-checking

New cards
18

C

The ________________ programming language is an example of a compiled language.

New cards
19

True

All phases of a compiler use a symbol table.

New cards
20

False

One of the advantages of interpreted languages is their faster execution time compared to compiled languages.

New cards
21

hierarchical

Which following term(s) is not a PL programming paradigm?

New cards
22

machine language, different for every type of CPU

What is the only language that a computer understands directly?

New cards
23

interpreter

A program which interprets each line of high level program at time of execution is called

New cards
24

True

Java uses a hybrid approach of compiling and interpreting.

New cards
25

assembly code into machine code

An assembler translates

New cards
26

machine language, assembly language, high level language

What are the three main types of computer programming languages?

New cards
27

Easy development

From the point of view of the programmer what are the major advantages of using ahigh-level language rather than internal machine code or assembler language?

New cards
28

Syntax

Programming languages have __________ , just like natural languages.

New cards
29

False

JavaScript is the same language as Java.

New cards
30

Scalable language

Scala is short form of

New cards
31

LISP

What programming language is used for artificial intelligence?

New cards
32

C

What programming language is used for system programming?

New cards
33

Java

What programming language is used for internet programming?

New cards
34

Fortran

What PL is used for scientific applications?

New cards
35

Cobol

What PL is used for business applications?

New cards
36

False

Machine code includes English words for basic computer commands.

New cards
37

True

Pascal became the most widely used introductory language

New cards
38

True

A strongly typed programming language is one that detects all type errors either at compile time or a run time.

New cards
39

Assembly

Which of the following is not a high level programming language?

New cards
40

To enable the program to be run on multiple platforms.

Which of the following is not an advantage of using a low level language?

New cards
41

interpreter

Program used for interactive computing is

New cards
42

False

In an abstract data type, the data representation of the type is the focus.

New cards
43

top-down parsing

When the parser starts constructing the parse tree from the start symbol and then tries to transform the start symbol to the input, it is called?

New cards
44

True

Denotational semantics is based on recursive function theory.

New cards
45

Denotational semantics

The most rigorous and most widely known formal method for describing the meaning of programs?

New cards
46

True

An actual_type is a synthesized attribute that stores the actual type of a variable or expression.

New cards
47

True

Synthesized attributes are used to pass semantic information up a parse tree.

New cards
48

the value of i in s

VARMP(i, s) produces?

New cards
49

False

An expected_type is a synthesized attribute associated with non-terminal that stores the expected type of an expression.

New cards
50

specify the static semantics of a programming language

Attribute grammars are used to

New cards
51

False

The lexical structure of complex programming languages like Java can not be defined using BNF

New cards
52

EBNF vs BNF

Not more powerful, but its rules are often simpler and clearer

New cards
53

right

Given the following BNF grammar for a language with two infix operators represented by # and $.

$ → ( ) # → x | y

What is the associativity of the $ operator:

New cards
54

True

If the grammar for a language is unambiguous, then there is only one way to parse each valid sentence in that language.

New cards
55

Components of a grammar

Productions, non-terminal symbols, terminal symbols, and a start symbol that must be a non-terminal.

New cards
56

Symbol Table

Which of the following is the name of the data structure in a compiler that is responsible for managing information about variables and their attributes? Choose ONE.

New cards
57

False

An operator's precedence determines whether it associates to the left or right.

New cards
58

The Dangling Else

Unable to determine with which 'if' the following 'else' associates

New cards
59

True

A recursive descent parser can not directly use a grammar that has left recursive rules.

New cards
60

{ }

EBNF for a series of zero or more; iteration

New cards
61

#

Given the following BNF grammar for a language with two infix operators,

$ → ( ) # → x | y

Which operator has higher precedence:

New cards
62

Derivation

The outcome of replacing a non-terminal by the right-hand side of one of its productions

New cards
63

False

The EBNF notation allows one to define grammars that can not be defined using the simpler BNF notation.

New cards
64

left

Given the following BNF grammar for a language with two infix operators represented by # and $.

$ → ( ) # → x | y

What is the associativity of the # operator:

New cards
65

The form of a language. A precise description of all the grammatically correct programs in a programming language.

Syntax

New cards
66

Represent the alphabet of the language being defined

Terminal symbol

New cards
67

-> | | ε -> 0 | 1

Which one of these grammars can produce the string 1010?

where ε is the empty string.

New cards
68

Lexer

Which program groups characters in code into tokens in a compiler?

New cards
69

Syntax analysis

In which phase in compiler design do we check the grammar of the programming language?

New cards
70

Formal Logic

On what branch of mathematics is axiomatic semantics based?

New cards
71

Preconditions and Postconditions

In Axiomatic semantics, the meaning of a specific statement is defined by:

New cards
72

Denotational semantics

__________ is based on recursive function theory.

New cards
73

Terminals.

In a parse tree, what do leaf nodes indicate?

New cards
74

Java

Which of the following programming languages is not susceptible to a stack-based buffer overflow attack?

New cards
75

On the stack before the return pointer,

On the stack after the return pointer,

In the stack frame of another function,

On the heap

Where can an attacker who is trying to "smash the stack" put their attack code if the buffer to be overflowed is on the stack? (5)

New cards
76

Pointer arithmetic

Which kinds of operations are most likely to lead to buffer overflows in C?

New cards
77

True

A "strong type system" is described as one in which there is no possibility of an unchecked run-time type error. In other words, the absence of unchecked run time errors is referred to as safety or type safety.

New cards
78

Whatever is in the memory space that comes after the buffer is overwritten

What typically happens when a buffer is overflowed?

New cards
79

Python

Which one of the following languages supports dynamic type binding?

New cards
80

Security-sensitive data,

A return pointer,

Any kind of pointer,

Anything that will make the program crash

What can be overwritten by a buffer overflow that causes a security problem?

New cards
81

the type system that guarantees not to generate type errors.

What is a strong type system?

New cards
82

boundary checks

Buffer-overflow may remain as a bug in apps if __________ are not done fully.

New cards
83

Only static type checking is done

For strongly-typed languages

New cards
84

C, C++

Applications developed by programming languages like ____ and ______ have this common buffer overflow error.

New cards
85

Whatever is at A[555] will be overwritten

If you declare an array as A[100] in C and you try to write data to A[555], what will happen?

New cards
86

int p = (int) malloc(50);

Which one of the following is an example of an explicit heap-dynamic variable?

New cards
87

dynamically

In an application that uses heap, the memory for data is allocated

New cards
88

True

Buffer-overflow attack can take place if a machine can execute a code that resides in the data/stack segment.

New cards
89

heap

Variables that get created dynamically when a function (such as malloc()) is called is created in the form of _______ data structure.

New cards
robot