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
What is the syntax for using the fetch() method?
-
fetch(url)
-
fetch(url, options)
-
fetch(url, data)
-
fetch(url, headers)
B
Correct answer
Explanation
The fetch() method takes two arguments: the URL of the resource to fetch and an optional options object.
What is the default HTTP method used by the fetch() method?
A
Correct answer
Explanation
The default HTTP method used by the fetch() method is GET, which is used to retrieve data from a server.
What is the purpose of the JSON.stringify() method?
-
To convert a JavaScript object to a JSON string
-
To convert a JSON string to a JavaScript object
-
To parse a JSON string
-
To validate a JSON string
A
Correct answer
Explanation
The JSON.stringify() method converts a JavaScript object or value to a JSON string.
What is the purpose of the JSON.parse() method?
-
To convert a JavaScript object to a JSON string
-
To convert a JSON string to a JavaScript object
-
To parse a JSON string
-
To validate a JSON string
B
Correct answer
Explanation
The JSON.parse() method converts a JSON string to a JavaScript object.
Which of the following is a popular programming language for Machine Learning?
A
Correct answer
Explanation
Python is a popular programming language for Machine Learning due to its extensive libraries, such as NumPy, Pandas, and TensorFlow.
What is the primary language used for developing cross-platform mobile apps with Xamarin?
C
Correct answer
Explanation
Xamarin primarily uses C# as its programming language for developing cross-platform mobile apps.
What is the primary language used for developing cross-platform mobile apps with React Native?
-
Java
-
Kotlin
-
C#
-
JavaScript
D
Correct answer
Explanation
React Native primarily uses JavaScript as its programming language for developing cross-platform mobile apps.
What is the primary language used for developing cross-platform mobile apps with Flutter?
D
Correct answer
Explanation
Flutter primarily uses Dart as its programming language for developing cross-platform mobile apps.
What is the primary language used for developing cross-platform mobile apps with Ionic?
-
Java
-
Kotlin
-
C#
-
TypeScript
D
Correct answer
Explanation
Ionic primarily uses TypeScript as its programming language for developing cross-platform mobile apps.
Which of the following is a propositional logic programming language?
-
Propositional Prolog
-
SAT Solver
-
ASP Solver
-
All of the above
D
Correct answer
Explanation
Propositional Prolog, SAT Solver, and ASP Solver are all propositional logic programming languages.
Which of the following is a predicate logic programming language?
-
First-Order Prolog
-
Datalog
-
Answer Set Programming
-
All of the above
D
Correct answer
Explanation
First-Order Prolog, Datalog, and Answer Set Programming are all predicate logic programming languages.
What is the primary programming language used in Unity?
A
Correct answer
Explanation
Unity primarily uses C# as its programming language, although it also supports other languages like C++ and JavaScript.
What is the primary programming language used in Unreal Engine?
B
Correct answer
Explanation
Unreal Engine primarily uses C++ as its programming language, although it also supports other languages like C# and Blueprint.
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 GameMaker Studio?
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.