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

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.

Multiple choice

Which of the following is a prominent application of Intuitionistic Logic in Computer Science?

  1. Program Verification

  2. Type Theory

  3. Formal Methods

  4. Software Engineering

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

Intuitionistic Logic has found applications in Computer Science, particularly in program verification, where it is used to formally prove the correctness of computer programs.

Multiple choice

Which of the following is a common programming language used for developing PaaS for IoT applications?

  1. Python

  2. Java

  3. Node.js

  4. All of the above

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

Python, Java, and Node.js are all commonly used programming languages for developing PaaS for IoT applications.

Multiple choice

Which of the following is a common programming language used for creating generative art?

  1. Python

  2. Java

  3. C++

  4. Processing

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

Processing is a popular programming language specifically designed for creating visual art. It is known for its simplicity, ease of use, and powerful graphics library, making it a popular choice among generative artists.

Multiple choice

Which programming language is commonly used for developing Android applications?

  1. Swift

  2. Java

  3. Kotlin

  4. C#

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

Kotlin is a modern, concise, and type-safe programming language designed for Android development. It is officially supported by Google and is widely used by Android developers.

Multiple choice

Which programming language is commonly used for developing web applications on the server-side?

  1. Python

  2. Java

  3. JavaScript

  4. C#

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

Python is a versatile programming language that is widely used for web development. It is known for its simplicity, readability, and extensive library support. Python frameworks such as Django and Flask are popular choices for building web applications.

Multiple choice

Which programming language is commonly used for developing mobile applications using React Native?

  1. Swift

  2. Java

  3. Kotlin

  4. JavaScript

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

React Native is a cross-platform mobile development framework that allows developers to build native mobile applications using JavaScript. It uses the same fundamental UI building blocks as React, making it easy for developers with React experience to build mobile apps.

Multiple choice

Which programming language is commonly used for developing mobile applications using Xamarin?

  1. Swift

  2. Java

  3. Kotlin

  4. C#

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

Xamarin is a cross-platform mobile development framework that allows developers to build native mobile applications using C#. It provides a shared codebase that can be used to build apps for both iOS and Android, making it a popular choice for developers who want to target multiple platforms.

Multiple choice

What is the difference between a compiler and an interpreter?

  1. A compiler translates high-level code into machine code before the program is run, while an interpreter translates high-level code into machine code as the program is running.

  2. A compiler is faster than an interpreter.

  3. A compiler produces more efficient machine code than an interpreter.

  4. All of the above.

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

A compiler is a computer program that translates high-level code into machine code before the program is run. An interpreter is a computer program that translates high-level code into machine code as the program is running. Compilers are faster than interpreters because they produce more efficient machine code.

Multiple choice

Which of the following is a model of computation that is used to define computability?

  1. Turing Machine

  2. Finite State Machine

  3. Pushdown Automaton

  4. Cellular Automaton

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

A Turing Machine is a theoretical model of computation that consists of a tape, a read/write head, and a finite set of states. It is used to define computability and study the limits of what can be computed.

Multiple choice

Which of the following languages is considered to be a constructed language, meaning it was artificially created rather than evolving naturally?

  1. Esperanto

  2. Lojban

  3. Toki Pona

  4. All of the above

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

Esperanto, Lojban, and Toki Pona are all constructed languages.

Multiple choice

What is a Turing machine?

  1. A mathematical model of computation that consists of a tape, a head, and a set of instructions.

  2. A physical device that can be used to perform computations.

  3. A programming language that is used to write programs for Turing machines.

  4. A software program that can be used to simulate Turing machines.

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

Turing machines are a theoretical model of computation that can be used to define the concept of computability.

Multiple choice

Which of these is NOT a common programming language taught in middle school technology classes?

  1. Python

  2. Java

  3. Scratch

  4. C++

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

C++ is generally not introduced in middle school technology classes due to its complexity and advanced concepts.

Multiple choice

What is the primary purpose of an assembler in microprocessor programming?

  1. Converting high-level language code into machine code

  2. Translating assembly language instructions into binary code

  3. Optimizing the performance of machine code

  4. Managing the allocation of memory resources

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

An assembler translates assembly language instructions, which are human-readable representations of machine code, into binary code that can be executed by the microprocessor.

Multiple choice

What is the role of a compiler in microprocessor programming?

  1. Translating high-level language code into assembly language

  2. Converting assembly language instructions into binary code

  3. Optimizing the performance of machine code

  4. Managing the allocation of memory resources

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

A compiler translates high-level language code, such as C or Python, into assembly language, which is a low-level language closer to machine code.