Computer Knowledge

Programming Languages and Compilers

2,284 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 syntax for using the fetch() method?

  1. fetch(url)

  2. fetch(url, options)

  3. fetch(url, data)

  4. fetch(url, headers)

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

The fetch() method takes two arguments: the URL of the resource to fetch and an optional options object.

Multiple choice

What is the default HTTP method used by the fetch() method?

  1. GET

  2. POST

  3. PUT

  4. DELETE

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

The default HTTP method used by the fetch() method is GET, which is used to retrieve data from a server.

Multiple choice

What is the purpose of the JSON.stringify() method?

  1. To convert a JavaScript object to a JSON string

  2. To convert a JSON string to a JavaScript object

  3. To parse a JSON string

  4. To validate a JSON string

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

The JSON.stringify() method converts a JavaScript object or value to a JSON string.

Multiple choice

What is the purpose of the JSON.parse() method?

  1. To convert a JavaScript object to a JSON string

  2. To convert a JSON string to a JavaScript object

  3. To parse a JSON string

  4. To validate a JSON string

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

The JSON.parse() method converts a JSON string to a JavaScript object.

Multiple choice

Which of the following is a popular programming language for Machine Learning?

  1. Python

  2. Java

  3. C++

  4. R

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

Python is a popular programming language for Machine Learning due to its extensive libraries, such as NumPy, Pandas, and TensorFlow.

Multiple choice

What is the primary language used for developing cross-platform mobile apps with Xamarin?

  1. Java

  2. Kotlin

  3. C#

  4. Swift

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

Xamarin primarily uses C# as its programming language for developing cross-platform mobile apps.

Multiple choice

What is the primary language used for developing cross-platform mobile apps with React Native?

  1. Java

  2. Kotlin

  3. C#

  4. JavaScript

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

React Native primarily uses JavaScript as its programming language for developing cross-platform mobile apps.

Multiple choice

What is the primary language used for developing cross-platform mobile apps with Flutter?

  1. Java

  2. Kotlin

  3. C#

  4. Dart

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

Flutter primarily uses Dart as its programming language for developing cross-platform mobile apps.

Multiple choice

What is the primary language used for developing cross-platform mobile apps with Ionic?

  1. Java

  2. Kotlin

  3. C#

  4. TypeScript

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

Ionic primarily uses TypeScript as its programming language for developing cross-platform mobile apps.

Multiple choice

Which of the following is a propositional logic programming language?

  1. Propositional Prolog

  2. SAT Solver

  3. ASP Solver

  4. All of the above

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

Propositional Prolog, SAT Solver, and ASP Solver are all propositional logic programming languages.

Multiple choice

Which of the following is a predicate logic programming language?

  1. First-Order Prolog

  2. Datalog

  3. Answer Set Programming

  4. All of the above

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

First-Order Prolog, Datalog, and Answer Set Programming are all predicate logic programming languages.

Multiple choice

What is the primary programming language used in Unity?

  1. C#

  2. C++

  3. Java

  4. Python

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

Unity primarily uses C# as its programming language, although it also supports other languages like C++ and JavaScript.

Multiple choice

What is the primary programming language used in Unreal Engine?

  1. C#

  2. C++

  3. Java

  4. Python

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

Unreal Engine primarily uses C++ as its programming language, although it also supports other languages like C# and Blueprint.

Multiple choice

What is the primary programming language used in Godot?

  1. C#

  2. C++

  3. Java

  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 GameMaker Studio?

  1. C#

  2. C++

  3. Java

  4. GML

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

GameMaker Studio uses its own scripting language called Game Maker Language (GML), which is designed to be easy to learn and use, even for beginners.