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

Multiple choice
  1. translator

  2. memory

  3. interpreter

  4. none of the above

Reveal answer Fill a bubble to check yourself
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.

Multiple choice
  1. A Mealy machine generates no languages as such.

  2. A Moore machine generates no languages as such.

  3. 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.

  4. All of the above

Reveal answer Fill a bubble to check yourself
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.

Multiple choice
  1. grammatically correct description of the system

  2. a tool for the system analyst to document the processing procedures using action oriented verbs and terms defined in the data dictionary

  3. a COBOL statement in the PROCEDURE DIVISION

  4. none of these

Reveal answer Fill a bubble to check yourself
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.

Multiple choice
  1. Assembly language

  2. Functional language

  3. Fourth-generation languages

  4. Imperative language

Reveal answer Fill a bubble to check yourself
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.

Multiple choice
  1. Imperative language

  2. Machine language

  3. Assembly language

  4. Fourth-generation language

Reveal answer Fill a bubble to check yourself
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.