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 primary programming language used in Unreal Engine?
D
Correct answer
Explanation
Unreal Engine primarily uses C++ as its programming language, providing developers with extensive control over the game's code.
What is the primary programming language used in Godot?
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.
What is the primary programming language used in CryEngine?
D
Correct answer
Explanation
CryEngine primarily uses C++ as its programming language, offering developers the ability to create complex and visually stunning games.
What is the primary programming language used in Unity's scripting API?
A
Correct answer
Explanation
Unity's scripting API primarily uses C# as its programming language, allowing developers to create custom scripts and game logic.
What is the primary programming language used in Corona SDK?
C
Correct answer
Explanation
Corona SDK primarily uses Lua as its programming language, which is known for its simplicity and ease of learning.
What is the primary programming language used in PlayMaker?
-
C#
-
Java
-
Python
-
Visual Scripting
D
Correct answer
Explanation
PlayMaker uses a visual scripting language, which allows developers to create game logic by connecting nodes and setting parameters.
What is the purpose of a compiler in computer programming?
-
To convert high-level programming language code into machine code
-
To execute programs written in high-level programming languages
-
To debug and fix errors in programs
-
To manage memory allocation and deallocation
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.
What is the term for the process of converting a high-level programming language statement into machine code?
-
Compilation
-
Interpretation
-
Execution
-
Debugging
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.
Which programming paradigm emphasizes the use of mathematical functions and expressions to solve problems?
-
Procedural Programming
-
Object-Oriented Programming
-
Functional Programming
-
Logic Programming
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.
What is the term for the process of translating a high-level programming language statement into an intermediate representation?
-
Compilation
-
Interpretation
-
Execution
-
Debugging
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.
Which of the following is NOT a common scripting language used in game engine development?
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.
What is a formal language?
-
A set of strings that can be generated by a grammar
-
A set of strings that can be recognized by a finite automaton
-
A set of strings that can be parsed by a context-free grammar
-
A set of strings that can be translated by a compiler
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.
What is the Cocke-Younger-Kasami algorithm?
-
An algorithm for parsing context-free grammars
-
An algorithm for generating context-free grammars
-
An algorithm for recognizing context-free grammars
-
An algorithm for translating context-free grammars
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.
What is the Earley algorithm?
-
An algorithm for parsing context-free grammars
-
An algorithm for generating context-free grammars
-
An algorithm for recognizing context-free grammars
-
An algorithm for translating context-free grammars
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.
What is the CYK algorithm?
-
An algorithm for parsing context-free grammars
-
An algorithm for generating context-free grammars
-
An algorithm for recognizing context-free grammars
-
An algorithm for translating context-free grammars
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.