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 technology programming languages
  1. C++

  2. Java

  3. SmallTalk

  4. C

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

Smalltalk (developed at Xerox PARC in the 1970s) was the first programming language to fully implement all core OOP concepts: objects, classes, inheritance, encapsulation, and polymorphism. While Simula 67 introduced some object-oriented concepts, Smalltalk was the first complete OOP system. C++ and Java came later.

Multiple choice technology programming languages
  1. F#

  2. ERLANG

  3. LISP

  4. FORTRAN

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

FORTRAN is a procedural/imperative language developed for scientific computing, while F#, Erlang, and Lisp are all functional programming languages that emphasize immutability, first-class functions, and declarative programming paradigms. Functional languages treat computation as the evaluation of mathematical functions, avoiding state and mutable data.

Multiple choice technology programming languages
  1. web languages

  2. declarative languages

  3. functional languages

  4. visual languages

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

Dylan, Erlang, Haskell, and ML are all functional programming languages that support first-class functions, higher-order functions, and immutability. They emphasize declarative programming where computation is expressed through function composition rather than sequence of state changes.

Multiple choice technology programming languages
  1. a defensive programming style

  2. a web framework

  3. a threading library

  4. a CPU design strategy

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

RISC (Reduced Instruction Set Computing) is a CPU design strategy that uses a small, highly optimized set of instructions rather than a more specialized set of instructions. RISC architectures emphasize simple instructions that can execute quickly in a single cycle, improving performance through simplification rather than complexity.

Multiple choice technology architecture
  1. Command

  2. Interpreter

  3. Observer

  4. Iterator.

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

Interpreter Pattern defines a grammar for a language and an interpreter to evaluate sentences in that language - specifically designed for parsing and translating expressions. Command encapsulates requests as objects. Observer defines one-to-many dependencies. Iterator traverses aggregates sequentially.

Multiple choice technology architecture
  1. Universal Model Locator.

  2. Unified Modeling Locator.

  3. Unified Modeling Language.

  4. Unique Modeling Language.

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

UML (Unified Modeling Language) is a standard modeling language for specifying, visualizing, constructing, and documenting software systems. It provides diagrams like class diagrams, sequence diagrams, and use case diagrams to represent different aspects of software design. The "Unified" refers to the unification of earlier modeling methodologies.

Multiple choice technology architecture
  1. Command

  2. Interpreter

  3. Observer

  4. Iterator.

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

The Interpreter Pattern is designed to parse and evaluate sentences in a language according to a grammar. It defines a representation for the grammar and an interpreter that uses that representation to interpret sentences. Command encapsulates requests, Observer defines notification updates, and Iterator traverses collections - none handle parsing and translation like Interpreter.

Multiple choice technology
  1. provides syntax for describing a software architecture

  2. helps design the language in which the software should be built

  3. codes the architecture into desired programming language

  4. describes how to design the software in a specified language

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

An Architectural Description Language (ADL) provides formal syntax and semantics for describing software architectures - components, connectors, and configurations. ADLs do NOT design programming languages (that's language design), do NOT code implementations (that's programming languages), and do NOT prescribe design methodology. They are modeling languages for architectural specification and analysis.

Multiple choice technology
  1. Debugging

  2. Coding

  3. Testing and Development

  4. Algorithm Documentation

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

Coding is the step in the Program Development Life Cycle (PDLC) where the algorithm is translated into actual programming language code. This is the implementation phase. Debugging comes after coding, Testing and Development is broader, and Algorithm Documentation involves writing explanations.

Multiple choice technology programming languages
  1. Python

  2. PHP

  3. JavaScript

  4. ActionScript

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

PHP is a server-side scripting language designed for web development, freely available, and commonly used on Linux web servers as an alternative to Microsoft's Active Server Pages (ASP). Python and JavaScript are also scripting languages but are not primarily known as ASP alternatives in the web server context. ActionScript is primarily used for Flash applications, not web servers.

Multiple choice technology programming languages
  1. Python

  2. PHP

  3. JavaScript

  4. ActionScript

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

PHP is a server-side scripting language designed for web development, commonly used on Linux web servers as an alternative to Microsoft's ASP (Active Server Pages). It is open-source, freely available, and can be embedded into HTML. Python and JavaScript are general-purpose languages, and ActionScript is for Flash multimedia.

Multiple choice technology mainframe
  1. Form Language Definition Processor

  2. Form Design

  3. D$DEF Routines
  4. Interaction to application programs

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

DPS 2200 consists of several components for form definition and processing. The Form Language Definition Processor is a core component responsible for processing and interpreting form language definitions. Other components include form design utilities and runtime routines, but the Form Language Definition Processor is specifically responsible for handling the form language syntax and structure.