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

Multiple choice

What is the term used to describe the process of converting high-level programming language code into machine code?

  1. Compilation

  2. Interpretation

  3. Execution

  4. Linking

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Compilation is the process of converting high-level programming language code into machine code before execution.

Multiple choice

Which programming paradigm is known for its use of pattern matching and recursion?

  1. Imperative Programming

  2. Declarative Programming

  3. Object-Oriented Programming

  4. Functional Programming

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Functional programming languages often use pattern matching and recursion as core concepts for expressing computations.

Multiple choice

What is the primary goal of a programming language?

  1. To provide a means of communication between humans and computers

  2. To translate human language into machine code

  3. To define a set of rules for organizing and manipulating data

  4. To create software applications

Reveal answer Fill a bubble to check yourself
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.

Multiple choice

Which programming paradigm is known for its use of mutable state and side effects?

  1. Imperative Programming

  2. Declarative Programming

  3. Object-Oriented Programming

  4. Functional Programming

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Imperative programming languages allow programmers to explicitly manipulate the state of a program using mutable variables and side effects.

Multiple choice

Which programming paradigm is known for its use of message passing between objects?

  1. Imperative Programming

  2. Declarative Programming

  3. Object-Oriented Programming

  4. Functional Programming

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Object-oriented programming allows objects to communicate with each other by sending and receiving messages.

Multiple choice

How has category theory been used in computer science?

  1. To develop new programming languages.

  2. To design new algorithms.

  3. To verify the correctness of software.

  4. All of the above.

Reveal answer Fill a bubble to check yourself
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.

Multiple choice

What is the primary programming language used in MATLAB?

  1. Python

  2. C++

  3. Java

  4. MATLAB

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

MATLAB has its own proprietary programming language, also called MATLAB, which is specifically designed for numerical computation.

Multiple choice

What is the primary programming language used in Maple?

  1. Python

  2. C++

  3. Java

  4. Maple

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Maple has its own proprietary programming language, also called Maple, which is specifically designed for symbolic computation.

Multiple choice

Which of the following is a type of formal language in the Chomsky hierarchy?

  1. Regular languages

  2. Context-free languages

  3. Context-sensitive languages

  4. Unrestricted languages

Reveal answer Fill a bubble to check yourself
Correct answer
Explanation

Regular languages, context-free languages, context-sensitive languages, and unrestricted languages are all types of formal languages in the Chomsky hierarchy.

Multiple choice

What is the most powerful type of formal language in the Chomsky hierarchy?

  1. Regular languages

  2. Context-free languages

  3. Context-sensitive languages

  4. Unrestricted languages

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Unrestricted languages are the most powerful type of formal language in the Chomsky hierarchy.

Multiple choice

Which of the following is NOT a common type of language translation software?

  1. CAT Tools (Computer-Aided Translation Tools)

  2. Machine Translation Software

  3. Terminology Management Software

  4. Grammar Checkers

  5. Spell Checkers

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Grammar Checkers are not specifically designed for language translation.

Multiple choice

What is the name of the first computer programming language?

  1. FORTRAN

  2. COBOL

  3. BASIC

  4. Pascal

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

FORTRAN, developed by John Backus in the 1950s, was the first computer programming language.

Multiple choice

Which of the following is a fundamental concept in computability theory?

  1. Turing Machine

  2. Lambda Calculus

  3. Regular Expression

  4. Finite State Machine

Reveal answer Fill a bubble to check yourself
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.

Multiple choice

Which programming language is commonly used for developing native iOS applications?

  1. Java

  2. Swift

  3. Kotlin

  4. C#

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Swift is a programming language developed by Apple specifically for iOS, iPadOS, macOS, watchOS, and tvOS.

Multiple choice

Which programming language is commonly used for developing native Android applications?

  1. Java

  2. Swift

  3. Kotlin

  4. C#

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Java is the primary programming language used for developing native Android applications.