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
-
translator
-
memory
-
interpreter
-
none of the above
C
Correct answer
Explanation
An interpreter is a program that directly executes instructions written in a programming language, allowing for interactive feedback during the compilation or execution process.
-
A Mealy machine generates no languages as such.
-
A Moore machine generates no languages as such.
-
For a given input string, length of the output string generated by a Moore machine is one more than the length of the output string generated by that of a Mealy machine.
-
All of the above
D
Correct answer
Explanation
Moore and Mealy machines are models for transducers, which map input strings to output strings. The length difference in output is a standard property of the Moore machine, which produces an output for every state transition including the initial state.
-
First generation
-
Second Generation
-
Third Generation
-
Fourth generation
C
Correct answer
Explanation
High level programming languages were first developed during the third generation.
-
grammatically correct description of the system
-
a tool for the system analyst to document the processing procedures using action oriented verbs and terms defined in the data dictionary
-
a COBOL statement in the PROCEDURE DIVISION
-
none of these
B
Correct answer
Explanation
Structured English is a method used by systems analysts to describe logic and processing procedures using a subset of English, making it easy for both technical and non-technical stakeholders to understand.
-
Cobol
-
Fortran
-
Programming in Logic
-
List Processing
B
Correct answer
Explanation
FORTRAN (Formula Translation) was the first widely used high-level programming language, developed by IBM in the 1950s for scientific and engineering applications.
A
Correct answer
Explanation
COBOL (Common Business Oriented Language) was specifically designed for business data processing, focusing on file handling and record management.
-
Assembly language
-
Functional language
-
Imperative language
-
List processing
A
Correct answer
Explanation
Assembly language uses mnemonics (alphabetic symbols) to represent machine code instructions, making it more readable than raw binary or numeric machine code.
-
Assembly language
-
Functional language
-
Fourth-generation languages
-
Imperative language
C
Correct answer
Explanation
Fourth-generation languages (4GLs) are designed to be closer to natural human language, allowing users to interact with databases and applications with minimal coding knowledge.
-
Basic
-
Smalltalk
-
Cobol
-
Fortran
B
Correct answer
Explanation
Smalltalk is a pure object-oriented programming language that emphasizes data encapsulation, where data and the methods that operate on it are bundled together within objects.
-
Imperative language
-
Machine language
-
Assembly language
-
Fourth-generation language
A
Correct answer
Explanation
Imperative programming languages are based on the concept of commands or statements that change the program state. COBOL, FORTRAN, Pascal, and C are classic examples of this paradigm, as they focus on describing how a program operates through a sequence of instructions.
A
Correct answer
Explanation
John G. Kemeny and Thomas E. Kurtz developed the BASIC (Beginner's All-purpose Symbolic Instruction Code) programming language at Dartmouth College in 1964.
-
Imperative language
-
Functional language
-
Machine language
-
Logical programming language
C
Correct answer
Explanation
Machine language consists of binary code that can be executed directly by the computer's CPU without the need for translation by a compiler or interpreter.
-
Java run
-
Javacomp
-
Javac
-
Run Java
C
Correct answer
Explanation
Javac is the Java compiler.
-
Loader
-
Translator
-
Interpreter
-
None of the above
A
Correct answer
Explanation
Loader is a program, used to place machine language program in a main memory in executable form.
-
COBOL
-
Pascal
-
BASIC
-
Unix
-
_
D
Correct answer
Explanation
Unix is a computer operating system capable of handling activities from multiple users at the same time.