Computer Knowledge
Programming Languages and Compilers
1,170 Questions
Programming languages and compilers involve the rules, syntax, and semantics used to write and execute software programs. Key areas include scripting languages, object oriented concepts, and parsing algorithms like top down parsers. Practice these computer science questions to build proficiency for technical and computer knowledge exams.
Object oriented languagesScripting languagesCompilers and parsersProgramming syntax
Programming Languages and Compilers Questions
What is the term used to describe the process of converting high-level programming language code into machine code?
-
Compilation
-
Interpretation
-
Execution
-
Linking
A
Correct answer
Explanation
Compilation is the process of converting high-level programming language code into machine code before execution.
Which programming paradigm is known for its use of pattern matching and recursion?
-
Imperative Programming
-
Declarative Programming
-
Object-Oriented Programming
-
Functional Programming
D
Correct answer
Explanation
Functional programming languages often use pattern matching and recursion as core concepts for expressing computations.
What is the primary goal of a programming language?
-
To provide a means of communication between humans and computers
-
To translate human language into machine code
-
To define a set of rules for organizing and manipulating data
-
To create software applications
C
Correct answer
Explanation
The primary goal of a programming language is to define a set of rules for organizing and manipulating data in a structured way.
Which programming paradigm is known for its use of mutable state and side effects?
-
Imperative Programming
-
Declarative Programming
-
Object-Oriented Programming
-
Functional Programming
A
Correct answer
Explanation
Imperative programming languages allow programmers to explicitly manipulate the state of a program using mutable variables and side effects.
Which programming paradigm is known for its use of message passing between objects?
-
Imperative Programming
-
Declarative Programming
-
Object-Oriented Programming
-
Functional Programming
C
Correct answer
Explanation
Object-oriented programming allows objects to communicate with each other by sending and receiving messages.
How has category theory been used in computer science?
-
To develop new programming languages.
-
To design new algorithms.
-
To verify the correctness of software.
-
All of the above.
D
Correct answer
Explanation
Category theory has been used in computer science to develop new programming languages, design new algorithms, and verify the correctness of software.
What is the primary programming language used in MATLAB?
D
Correct answer
Explanation
MATLAB has its own proprietary programming language, also called MATLAB, which is specifically designed for numerical computation.
What is the primary programming language used in Maple?
D
Correct answer
Explanation
Maple has its own proprietary programming language, also called Maple, which is specifically designed for symbolic computation.
Which of the following is a type of formal language in the Chomsky hierarchy?
-
Regular languages
-
Context-free languages
-
Context-sensitive languages
-
Unrestricted languages
Correct answer
Explanation
Regular languages, context-free languages, context-sensitive languages, and unrestricted languages are all types of formal languages in the Chomsky hierarchy.
What is the most powerful type of formal language in the Chomsky hierarchy?
-
Regular languages
-
Context-free languages
-
Context-sensitive languages
-
Unrestricted languages
D
Correct answer
Explanation
Unrestricted languages are the most powerful type of formal language in the Chomsky hierarchy.
Which of the following is NOT a common type of language translation software?
-
CAT Tools (Computer-Aided Translation Tools)
-
Machine Translation Software
-
Terminology Management Software
-
Grammar Checkers
-
Spell Checkers
D
Correct answer
Explanation
Grammar Checkers are not specifically designed for language translation.
What is the name of the first computer programming language?
-
FORTRAN
-
COBOL
-
BASIC
-
Pascal
A
Correct answer
Explanation
FORTRAN, developed by John Backus in the 1950s, was the first computer programming language.
Which of the following is a fundamental concept in computability theory?
-
Turing Machine
-
Lambda Calculus
-
Regular Expression
-
Finite State Machine
A
Correct answer
Explanation
A Turing machine is a theoretical model of computation that defines an abstract machine that can be used to simulate any computer algorithm.
Which programming language is commonly used for developing native iOS applications?
B
Correct answer
Explanation
Swift is a programming language developed by Apple specifically for iOS, iPadOS, macOS, watchOS, and tvOS.
Which programming language is commonly used for developing native Android applications?
A
Correct answer
Explanation
Java is the primary programming language used for developing native Android applications.