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 primary programming language used in Unreal Engine?

  1. C#

  2. Java

  3. Python

  4. C++

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

Unreal Engine primarily uses C++ as its programming language, providing developers with extensive control over the game's code.

Multiple choice

What is the primary programming language used in Godot?

  1. C#

  2. Java

  3. Python

  4. GDScript

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

Godot uses its own scripting language called GDScript, which is designed to be easy to learn and use, even for beginners.

Multiple choice

What is the primary programming language used in CryEngine?

  1. C#

  2. Java

  3. Python

  4. C++

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

CryEngine primarily uses C++ as its programming language, offering developers the ability to create complex and visually stunning games.

Multiple choice

What is the primary programming language used in Unity's scripting API?

  1. C#

  2. Java

  3. Python

  4. C++

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

Unity's scripting API primarily uses C# as its programming language, allowing developers to create custom scripts and game logic.

Multiple choice

What is the primary programming language used in Corona SDK?

  1. C#

  2. Java

  3. Lua

  4. C++

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

Corona SDK primarily uses Lua as its programming language, which is known for its simplicity and ease of learning.

Multiple choice

What is the primary programming language used in PlayMaker?

  1. C#

  2. Java

  3. Python

  4. Visual Scripting

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

PlayMaker uses a visual scripting language, which allows developers to create game logic by connecting nodes and setting parameters.

Multiple choice

What is the purpose of a compiler in computer programming?

  1. To convert high-level programming language code into machine code

  2. To execute programs written in high-level programming languages

  3. To debug and fix errors in programs

  4. To manage memory allocation and deallocation

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

A compiler translates high-level programming language code into machine code, which can be directly executed by the computer's processor.

Multiple choice

What is the term for the process of converting a high-level programming language statement into machine code?

  1. Compilation

  2. Interpretation

  3. Execution

  4. Debugging

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

Compilation is the process of converting a high-level programming language statement into machine code, which can be directly executed by the computer's processor.

Multiple choice

Which programming paradigm emphasizes the use of mathematical functions and expressions to solve problems?

  1. Procedural Programming

  2. Object-Oriented Programming

  3. Functional Programming

  4. Logic Programming

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

Functional Programming emphasizes the use of mathematical functions and expressions to solve problems, focusing on the evaluation of expressions rather than the execution of statements.

Multiple choice

What is the term for the process of translating a high-level programming language statement into an intermediate representation?

  1. Compilation

  2. Interpretation

  3. Execution

  4. Debugging

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

Interpretation is the process of translating a high-level programming language statement into an intermediate representation, which is then executed directly by the interpreter.

Multiple choice

Which of the following is NOT a common scripting language used in game engine development?

  1. Lua

  2. C#

  3. Python

  4. Java

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

Java is not a common scripting language used in game engine development. The other options, Lua, C#, and Python, are widely used for scripting in game engines.

Multiple choice

What is a formal language?

  1. A set of strings that can be generated by a grammar

  2. A set of strings that can be recognized by a finite automaton

  3. A set of strings that can be parsed by a context-free grammar

  4. A set of strings that can be translated by a compiler

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

A formal language is a set of strings that can be generated by a grammar. A grammar is a set of rules that define how strings can be constructed from a set of symbols.

Multiple choice

What is the Cocke-Younger-Kasami algorithm?

  1. An algorithm for parsing context-free grammars

  2. An algorithm for generating context-free grammars

  3. An algorithm for recognizing context-free grammars

  4. An algorithm for translating context-free grammars

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

The Cocke-Younger-Kasami algorithm is an algorithm for parsing context-free grammars. It is a bottom-up parsing algorithm that works by constructing a parse tree for the input string.

Multiple choice

What is the Earley algorithm?

  1. An algorithm for parsing context-free grammars

  2. An algorithm for generating context-free grammars

  3. An algorithm for recognizing context-free grammars

  4. An algorithm for translating context-free grammars

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

The Earley algorithm is an algorithm for parsing context-free grammars. It is a bottom-up parsing algorithm that works by constructing a parse forest for the input string.

Multiple choice

What is the CYK algorithm?

  1. An algorithm for parsing context-free grammars

  2. An algorithm for generating context-free grammars

  3. An algorithm for recognizing context-free grammars

  4. An algorithm for translating context-free grammars

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

The CYK algorithm is an algorithm for recognizing context-free grammars. It is a bottom-up parsing algorithm that works by constructing a parse table for the input string.