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. uses alphabetic codes in place of binary numbers used in machine language

  2. is the easiest language to write programs

  3. need not be translated into machine language

  4. None of these

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

Assembly languageĀ uses alphabetic codes in place of binary numbers used in machine language.

Multiple choice
  1. is the language in which programs were first written

  2. is the only language understood by the computer

  3. differs from one type of computer to another

  4. All of these

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

Machine language is the low-level binary code that computers execute directly; it is hardware-specific and was the first language used for programming.

Multiple choice
  1. CLI provides the runtime specific code format and specification.

  2. It translates the native code to be executable by a virtual machine.

  3. CIL is an object-oriented assembly language.

  4. The source code is CLI's equivalent to assembly language for a CPU.

  5. All of these

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

Yes all are correct.

Multiple choice
  1. a set of regular expressions

  2. syntax tree

  3. a set of tokens

  4. a string of characters

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

The lexical analyzer (or scanner) reads the source code as a stream of characters and groups them into meaningful sequences called tokens.

Multiple choice
  1. Syntax Analysis

  2. Code Generation

  3. Lexical Analysis

  4. Intermediate Code Generation

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

Syntax analysis (parsing) deals with the structure of the language defined by a grammar, which is independent of the specific machine architecture on which the code will run.

Multiple choice
  1. Debugger

  2. Editor

  3. Spooler

  4. Bugger

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

A spooler is a system process that manages the queue of jobs for a peripheral device like a printer; it is generally considered a system service or daemon rather than a user-facing utility program.