Looks like no one added any tags here yet for you.
False
An advantage of using a compiler is that it generally produces portable code able to fun on many different hardware and software platforms.
block statement
What innovation introduced in ALGOL68 is often credited to Pascal?
False
Most programming languages are implemented as interpreters these days.
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?
True
Python is interpreted.
Encapsulation, Inheritance, Polymorphism
Which of the following mechanisms is/are provided by Object Oriented Language to implement Object Oriented Model?
Reduce complexity
Which of the following is the functionality of 'Data Abstraction'?
Algol
Which PL is considered an ancestor to C, Java, and Ruby?
Logic Programming
Prolog comes under ___________
functional-oriented
Scala is part of the: ____?
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.
FORTRAN
Programming language which is used for scientific purposes in batches is
Byte code
_______________ is the assembly language for an imaginary architecture.
False
Markup languages are general purpose programming languages.
List Processing
Lisp is the second oldest high level programming language. Here Lisp stands for
add comments to it
To made program more easier to understand, programmers can
False
C has strong type-checking
C
The ________________ programming language is an example of a compiled language.
True
All phases of a compiler use a symbol table.
False
One of the advantages of interpreted languages is their faster execution time compared to compiled languages.
hierarchical
Which following term(s) is not a PL programming paradigm?
machine language, different for every type of CPU
What is the only language that a computer understands directly?
interpreter
A program which interprets each line of high level program at time of execution is called
True
Java uses a hybrid approach of compiling and interpreting.
assembly code into machine code
An assembler translates
machine language, assembly language, high level language
What are the three main types of computer programming languages?
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?
Syntax
Programming languages have __________ , just like natural languages.
False
JavaScript is the same language as Java.
Scalable language
Scala is short form of
LISP
What programming language is used for artificial intelligence?
C
What programming language is used for system programming?
Java
What programming language is used for internet programming?
Fortran
What PL is used for scientific applications?
Cobol
What PL is used for business applications?
False
Machine code includes English words for basic computer commands.
True
Pascal became the most widely used introductory language
True
A strongly typed programming language is one that detects all type errors either at compile time or a run time.
Assembly
Which of the following is not a high level programming language?
To enable the program to be run on multiple platforms.
Which of the following is not an advantage of using a low level language?
interpreter
Program used for interactive computing is
False
In an abstract data type, the data representation of the type is the focus.
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?
True
Denotational semantics is based on recursive function theory.
Denotational semantics
The most rigorous and most widely known formal method for describing the meaning of programs?
True
An actual_type is a synthesized attribute that stores the actual type of a variable or expression.
True
Synthesized attributes are used to pass semantic information up a parse tree.
the value of i in s
VARMP(i, s) produces?
False
An expected_type is a synthesized attribute associated with non-terminal that stores the expected type of an expression.
specify the static semantics of a programming language
Attribute grammars are used to
False
The lexical structure of complex programming languages like Java can not be defined using BNF
EBNF vs BNF
Not more powerful, but its rules are often simpler and clearer
right
Given the following BNF grammar for a language with two infix operators represented by # and $.
What is the associativity of the $ operator:
True
If the grammar for a language is unambiguous, then there is only one way to parse each valid sentence in that language.
Components of a grammar
Productions, non-terminal symbols, terminal symbols, and a start symbol that must be a non-terminal.
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.
False
An operator's precedence determines whether it associates to the left or right.
The Dangling Else
Unable to determine with which 'if' the following 'else' associates
True
A recursive descent parser can not directly use a grammar that has left recursive rules.
{ }
EBNF for a series of zero or more; iteration
#
Given the following BNF grammar for a language with two infix operators,
Which operator has higher precedence:
Derivation
The outcome of replacing a non-terminal by the right-hand side of one of its productions
False
The EBNF notation allows one to define grammars that can not be defined using the simpler BNF notation.
left
Given the following BNF grammar for a language with two infix operators represented by # and $.
What is the associativity of the # operator:
The form of a language. A precise description of all the grammatically correct programs in a programming language.
Syntax
Represent the alphabet of the language being defined
Terminal symbol
Which one of these grammars can produce the string 1010?
where ε is the empty string.
Lexer
Which program groups characters in code into tokens in a compiler?
Syntax analysis
In which phase in compiler design do we check the grammar of the programming language?
Formal Logic
On what branch of mathematics is axiomatic semantics based?
Preconditions and Postconditions
In Axiomatic semantics, the meaning of a specific statement is defined by:
Denotational semantics
__________ is based on recursive function theory.
Terminals.
In a parse tree, what do leaf nodes indicate?
Java
Which of the following programming languages is not susceptible to a stack-based buffer overflow attack?
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)
Pointer arithmetic
Which kinds of operations are most likely to lead to buffer overflows in C?
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.
Whatever is in the memory space that comes after the buffer is overwritten
What typically happens when a buffer is overflowed?
Python
Which one of the following languages supports dynamic type binding?
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?
the type system that guarantees not to generate type errors.
What is a strong type system?
boundary checks
Buffer-overflow may remain as a bug in apps if __________ are not done fully.
Only static type checking is done
For strongly-typed languages
C, C++
Applications developed by programming languages like ____ and ______ have this common buffer overflow error.
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?
int p = (int) malloc(50);
Which one of the following is an example of an explicit heap-dynamic variable?
dynamically
In an application that uses heap, the memory for data is allocated
True
Buffer-overflow attack can take place if a machine can execute a code that resides in the data/stack segment.
heap
Variables that get created dynamically when a function (such as malloc()) is called is created in the form of _______ data structure.