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
Which of the following is NOT a type of finite automaton?
-
Deterministic Finite Automaton (DFA)
-
Non-Deterministic Finite Automaton (NFA)
-
Pushdown Automaton (PDA)
-
Linear Bounded Automaton (LBA)
C
Correct answer
Explanation
Pushdown Automata are not finite automata, as they have a stack memory that allows them to remember previous states.
Which of the following is NOT a type of context-free grammar?
-
Chomsky Normal Form (CNF)
-
Greibach Normal Form (GNF)
-
Regular Grammar
-
Context-Sensitive Grammar
C
Correct answer
Explanation
Regular grammars are not context-free grammars, as they have productions that can only generate strings of a certain length.
Which of the following is NOT a type of Turing machine?
-
Deterministic Turing Machine (DTM)
-
Non-Deterministic Turing Machine (NTM)
-
Universal Turing Machine (UTM)
-
Linear Bounded Automaton (LBA)
D
Correct answer
Explanation
Linear Bounded Automata are not Turing machines, as they have a limited amount of memory.
Which of the following is NOT a type of language?
-
Regular Language
-
Context-Free Language
-
Context-Sensitive Language
-
Recursively Enumerable Language
D
Correct answer
Explanation
Recursively Enumerable Languages are not a type of language in the Chomsky Hierarchy.
Which of the following is NOT a type of parsing?
-
Top-Down Parsing
-
Bottom-Up Parsing
-
Left-to-Right Parsing
-
Right-to-Left Parsing
C
Correct answer
Explanation
Left-to-Right Parsing is not a type of parsing, as it is not a complete parsing strategy.
Which of the following is NOT a type of language technology?
-
Machine Translation
-
Speech Recognition
-
Natural Language Processing
-
Optical Character Recognition
D
Correct answer
Explanation
Optical Character Recognition (OCR) is a technology that converts scanned images of printed or handwritten text into machine-encoded text, making it searchable and editable. It is not a language technology as it does not involve the understanding or processing of language.
Which of the following is an example of jargon?
-
Computer
-
Software
-
Algorithm
-
All of the above
C
Correct answer
Explanation
Algorithm is an example of jargon because it is a technical term that is not commonly used by the general public.
Which programming language is commonly used for creating generative art?
-
Python
-
Java
-
C++
-
Processing
D
Correct answer
Explanation
Processing is a programming language and development environment that is specifically designed for creating visual arts. It is widely used for creating generative art due to its ease of use and powerful graphics library.
Which of the following is NOT a type of language?
-
Natural language
-
Artificial language
-
Programming language
-
Sign language
C
Correct answer
Explanation
Programming languages are not a type of language in the same way that natural languages, artificial languages, and sign languages are.
Which of the following is NOT a common method used for software translation?
-
Machine translation.
-
Human translation.
-
Crowdsourced translation.
-
Automated translation.
D
Correct answer
Explanation
Automated translation is not a common method used for software translation, as it often produces inaccurate and unnatural translations that require significant manual editing.
Which of the following is NOT a common method used for software translation?
-
Machine translation.
-
Human translation.
-
Crowdsourced translation.
-
Automated translation.
D
Correct answer
Explanation
Automated translation is not a common method used for software translation, as it often produces inaccurate and unnatural translations that require significant manual editing.
Which of the following is NOT a common method used for software translation?
-
Machine translation.
-
Human translation.
-
Crowdsourced translation.
-
Automated translation.
D
Correct answer
Explanation
Automated translation is not a common method used for software translation, as it often produces inaccurate and unnatural translations that require significant manual editing.
Which of the following is a popular programming language for data analysis and machine learning?
A
Correct answer
Explanation
Python is a widely used programming language for data analysis and machine learning due to its simplicity, rich libraries, and extensive community support.
Which of the following is a widely used programming language for developing mobile applications?
C
Correct answer
Explanation
Swift is a modern and powerful programming language developed by Apple specifically for iOS, iPadOS, macOS, tvOS, and watchOS application development.
Which of the following is a popular programming language for developing desktop applications?
D
Correct answer
Explanation
C# is a modern, object-oriented programming language developed by Microsoft that is widely used for developing desktop applications, web applications, and mobile applications.