WorksheetsTypes of Programming Languages - Quiz
Total questions: 20
Worksheet time: 27mins
What is a client-side scripting language?
A language that runs in the browser and interacts with the user interface.
A language that runs exclusively on desktop systems.
A language used for querying databases.
A language that runs on the server and sends data to the client.
What are the three broad categories that programming languages fall into?
Machine languages, Assembly languages, and Higher-level languages
Low-level languages, Middle-level languages, and High-level languages
First-generation languages, Second-generation languages, and Third-generation languages
Binary languages, English-like languages, and Graphical languages
What is the primary focus of procedural programming?
Writing code as a sequence of procedures or functions
Creating complex data structures
Using object-oriented programming exclusively
Visual design of the user interface
What is a key characteristic of functional programming?
Emphasis on procedural programming
Emphasis on how a computer should perform tasks
Declarative programming style
Frequent use of global/static variables
What does inheritance provide in object-oriented programming?
The ability to define new attributes and methods
The ability to hide existing attributes and methods
The mechanism to create new classes
The ability to inherit attributes and methods from a parent class
Assembly language is considered a low-level programming language.
True
False
What is the main distinction between interpreted and compiled languages?
Interpreted languages are always faster than compiled languages
Compiled languages are converted into machine code before execution, while interpreted languages are executed line by line
Interpreted languages are only used for web development
Compiled languages are only used in embedded systems
What is the main difference between compiled and interpreted languages?
Compiled languages are executed line by line, while interpreted languages are compiled into machine code.
Compiled languages are translated into machine code before execution, while interpreted languages are executed line by line.
Interpreted languages are faster than compiled languages.
Compiled languages only work on web servers.
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
Syntax
Tokens
Semantic
Lexemes
What is the key characteristic of polymorphism in object-oriented programming?
It allows methods with the same signature but different behaviors.
It enforces the use of the same method name within a class.
It ensures that all methods have different signatures.
It provides a way to send messages between objects.
What role does a compiler play in the development of a program?
Translates high-level language into machine code line by line
Converts source code into object code immediately
Reads the source program and checks for syntax errors
Translates the source code and runs it before translating the next statement
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
Syntax
Tokens
Semantic
Lexemes
What characterizes fifth-generation languages (5GLs) in the programming community?
High ease of use and development
Use of algorithms to solve problems
Reliance on constraints rather than algorithms
Limited debate and clear definition
Which of the following is not a functional language construct?
No loops
Recursion
Variable assignments
List comprehensions
Which of the following languages is known for its use in web development on both front-end and back-end?
Python
JavaScript
C#
R
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?
Ease of Program Verification
Naturalness
Orthogonality
Portability
What are the two primary components of a software object in object-oriented programming?
Variables and assignments
Functions and procedures
Attributes and behaviors
Encapsulation and polymorphism
What is the main disadvantage of machine language?
Translation Free
High Speed
Machine Dependent
Tedious
Which statement best describes a high-level programming language?
It requires knowledge of hardware-specific instructions.
It provides a high level of abstraction and is closer to human language.
It is compiled directly into machine code without interpretation.
It is only used for system programming.
In a typical C program development environment, what is the role of the linker?
Edits the source code
Stores object code on disk
Links the object code with libraries
Executes the program instructions
