wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

BSCS 3-3 : Principles of Programming Languages - Quiz # 1

Total questions: 29

Worksheet time: 17mins

Name
Class
Date
1.

One of the characteristics that makes a good programming language is by having a clear, simple and unity on it, which means?

a)

Program structure reflects the logical structure of algorithm

b)

Being able to combine various language features systematically in which every combination of features is meaningful

c)

Simple readable program is easy to write and easy to decipher once it needs modification

d)

Transportability of the resulting programs from the computer on which they are developed to other computer systems

2.

This refers to the rules that specify the correct combined sequence of symbols that can be used to form a correct structured program using a given programming language

a)

Syntax

b)

Tokens

c)

Semantic

d)

Lexemes

3.

This refers to the character strings assembled from the character stream of a program, which correspond to specific grammatical elements of that language

a)

Syntax

b)

Tokens

c)

Semantic

d)

Lexemes

4.

These are the building blocks of a program’s grammatical structure, representing such basic elements as identifiers, numeric_literals, and specific keywords and operators of the language

a)

Syntax

b)

Tokens

c)

Semantic

d)

Lexemes

5.

Which of the following statement is not true about lexemes?

a)

Lexemes of a programming language includes numeric literals, operators, and special words, among others.

b)

Lexemes are partitioned into groups, for example the names of variables, methods, classes, and so forth in a programming language form a group called identifiers

c)

Each lexeme group is represented by a name, or token

d)

None of the mentioned

6.

Which characteristics of a good programming language describes the relationship between different features in a way that they have minimal effect on each other when they are combined?

a)

Ease of Program Verification

b)

Naturalness

c)

Orthogonality

d)

Portability

7.

This refers as one of the classes of programming environments in which the processing of data are per group.

a)

Batch processing environment

b)

Inter Active Environment

c)

Embedded System Environment

d)

Programming Environment

8.

In principles of programming languages, this concept is the process of associating attributes with names, specifying the exact nature of an attribute, that for each entity, attribute information is contained in a repository

a)

Binding

b)

Naming Variables

c)

Constant

d)

Lifetime

9.

A programming paradigm that emphasizes the computation of values by the use of expressions and building blocks of the program.

a)

Imperative Languages

b)

Functional Languages

c)

Object Oriented Languages

d)

Concurrent Languages

10.

This type of binding is done at the time or during program execution.

a)

Binding Time

b)

Static Binding

c)

Dynamic Binding

d)

Early Binding

11.

A time at which the source code is converted into an executable or machine code. Address binding that is done before loading the program into memory.

a)

Binding Time

b)

Execution Time

c)

Implementation Time

d)

Translation Time

12.

Backus-Naur Form (BNF) is the most widely used method for describing programming syntax under what?

a)

Syntax Analyzer

b)

Formal Language Theory

c)

Context Free Grammar

d)

Regular Expression

13.

In creating production rule using BNF, this part is where any set of combinations of terminals which usually presented by capital letters or inside of "< >".

a)

Terminals

b)

Non-Terminals

c)

Recursive Case

d)

Base Case

14.

The entity which generate Language is termed as:

a)

Grammar

b)

Data

c)

Tokens

d)

Regular Language

15.

Consider the grammar given below E? E+E | E*E | E-E | E/E | E^E | (E) | id Assume that + and ^ have the same but least precedence, and / have the next higher precedence but the same precedence and finally ^ has the highest precedence. Assume + and ^ associate to the left like and / and that ^ associates to the right. Choose the correct for the ordered pairs (^,^), (-,-), (+,+), (*,*) in the operator precedence table constructed for the grammar

a)

All <

b)

All >

c)

< >, =

d)

< > > >

16.

Grammar that produce more than one Parse tree for same sentence is _______

a)

Complementation

b)

Precedence

c)

Ambiguous

d)

Unambiguous

17.

Which of the following is example of Lexemes?

a)

Identifiers

b)

Constants

c)

Keywords

d)

All of the mentioned

18.

The syntax analyzer takes the lexical units from the lexical analyzer and uses them to construct hierarchical structures, representing the syntactic structure of the program. This is what we called _________.

a)

Constant

b)

Derivations

c)

Symbol Table

d)

Parse Tree

19.

Non-Terminals have these angled brackets (< >) around them indicating that they cannot be expanded into something else.

a)

TRUE

b)

FALSE

20.

This was the earliest programming languages that was easy to visualize based on the idea of the von Neumann architecture

a)

Imperative Languages

b)

Functional Languages

c)

Object Oriented Languages

d)

Concurrent Languages

21.

A term used to describe a value that does not change throughout the execution of the program, unlike a variable

a)

Constant

b)

Derivations

c)

Symbol Table

d)

Parse Tree

22.

An anomalous condition encountered during the execution of a program that alters the way of the program or the microprocessor to a different path.

a)

Type Checking

b)

Loader

c)

Exception Handling

d)

Aliasing

23.

Which of the following are examples of keywords in C Language

a)

while

b)

if

c)

static

d)

All of the mentioned

24.

These strings or symbols has a special purpose in a language that cannot be used as an identifier

a)

Reserved Words

b)

Keywords

c)

Meaningful Words

d)

Function Statements

25.

This determines when the variable or object is created and destroyed in memory

a)

Binding

b)

Naming Variables

c)

Constant

d)

Lifetime

26.

These are the nameless variables that they don’t have names which is allocated on the heap for dynamic data structures or for instances of objects in Object Oriented programming languages

a)

Scalar Variables

b)

Explicit heap-dynamic Variables

c)

Implicit heap-dynamic Variables

d)

Stack Dynamic Variable

27.

These types of data contains a single data values and class of such data objects over which various operations.

a)

Numeric Data Types

b)

Elementary Data Types

c)

String Data Types

d)

Array

28.

This refers as a structured data type composed of a fixed number of components of the same type organized as a simple linear segment.

a)

Records

b)

List

c)

Vectors

d)

Array

29.

Which of the following is not the operations of Character String in a programming languages?

a)

Relational operation

b)

Formatting for input-output

c)

Substring selection

d)

Composed of an ordered sequence of strings