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. specifying the syntax of a language

  2. describing how a program works

  3. shell programming

  4. multi user programming

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

BNF (Backus-Naur Form) is a formal notation used to specify the syntax of programming languages and other formal languages. It defines grammar rules and production rules, not how programs work or shell programming.

Multiple choice
  1. is a low level language

  2. descibes what processing is to be done without specifying the particular procedures to be used

  3. is frequently used by software designers

  4. all of the above

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

descibes what processing is to be done without specifying the particular procedures to be used

Multiple choice
  1. is a feature of all the programming languages

  2. helps make large programs more understandable

  3. both (1) and (2)

  4. neither (1) nor (2)

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

helps make large programs more understandable

Multiple choice
  1. Lexical analysis

  2. Code generation

  3. Static analysis

  4. Both (1) and (2)

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

The compilation process consists of multiple phases: Lexical analysis (breaking source code into tokens) and Code generation (producing machine code) are both valid phases. Other phases include syntax analysis, semantic analysis, and code optimization. Static analysis is typically part of semantic analysis phase.

Multiple choice
  1. It is a machine language.

  2. It is an assembly language.

  3. It is a high-level language.

  4. None of the above

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

Pseudocode is an informal programming description that uses structural conventions of programming languages but is intended for human reading rather than machine execution. It is not machine language (binary), not assembly language (low-level mnemonic), and not a high-level programming language (executable).

Multiple choice
  1. Machine

  2. Procedural

  3. Assembly

  4. Object-oriented

  5. Strictly-typed

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

C is a procedural programming language because it follows a procedural paradigm where programs are structured as a sequence of instructions or procedures. It is not object-oriented (like C++ or Java), not strictly-typed (weak typing with implicit conversions), not a machine language, and not an assembly language.

Multiple choice
  1. Advanced

  2. Basic

  3. System

  4. Compiler

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

BASIC is an acronym for Beginner's All-purpose Symbolic Instruction Code, which is a family of general-purpose, high-level programming languages. While 'Advanced', 'System', and 'Compiler' are common terms in computing, they are not acronyms for specific programming languages.

Multiple choice
  1. high level language

  2. assembly level language

  3. machine level language

  4. middle level language

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

C is called a middle level language because it combines the best elements of high level language with the control and flexibility of assembly level languages.