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

  2. Yaac

  3. TeX

  4. Emacs

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

Yacc (Yet Another Compiler Compiler) is a parser generator that creates parsers from grammar specifications. It works with Lex to build complete compiler front-ends. Lex handles lexical analysis while Yacc handles syntax analysis according to context-free grammars. TeX is typesetting software and Emacs is a text editor.

Multiple choice
  1. lexical analyzer.

  2. scanner.

  3. parser.

  4. code generator.

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

Syntax analysis, or parsing, is the stage where the compiler checks if the sequence of tokens conforms to the grammar of the programming language. This task is performed by the parser.

Multiple choice
  1. a machine language

  2. an assembly language

  3. a high level language

  4. all of the above

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

Assembly language uses mnemonics (like MOV, ADD) and symbolic labels (variable names) to represent machine instructions, making it more readable than raw machine code.

Multiple choice
  1. designs an algorithm

  2. codes an algorithm in a programming language

  3. debugs the program

  4. all of the above

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

Program development is a holistic process that includes defining the algorithm, writing the code, and testing/debugging to ensure correctness.

Multiple choice
  1. PASCAL

  2. BASIC

  3. FORTRAN

  4. Both (1) & (3)

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

Pascal was designed to encourage good programming practices, such as structured programming, by enforcing strict data typing and block structures. BASIC and early FORTRAN were historically less structured, though modern versions have evolved.

Multiple choice
  1. PASCAL

  2. SNOBOL

  3. FORTRAN

  4. None of the above

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

SNOBOL (String Oriented Symbolic Language) is a classic programming language specifically designed for string manipulation and pattern matching. Pascal and FORTRAN are general-purpose languages.

Multiple choice
  1. are compatible with each other

  2. can be supported by any operating system

  3. have the same syntax

  4. none of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Multiple choice
  1. API for developing 32-bit applications

  2. text editor for UNIX-based computer systems

  3. program that flags suspicious constructs

  4. UNIX utility that parses text

  5. screen-oriented text editor

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

PICO stands for pine composer. It is an easy-to-use text editor for UNIX and UNIX-based system.

Multiple choice
  1. The UML is a language for visualising.

  2. The UML is a language for constructing.

  3. The UML is a language for modeling.

  4. The UML is a language for documenting.

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

This means that it is possible to map from a model in the UML to a programming language such as JAVA, C++ or VB, or even to table in the relational database or the persistent store of an object oriented database.

Multiple choice apostrophe mark punctuation english

Most contemporary computers language is binary which is written using only two symbols, 0s and 1s.

Choose the option that best corrects the sentence.

  1. NO CHANGE

  2. Most contemporary computers' language is binary which is written using only two symbols, 0's and 1's.

  3. Most contemporary computers' language is binary which is written using only two symbols, 0s and 1s.

  4. Most contemporary computer's language is binary which is written using only two symbols, 0's and 1's.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation
According to general rule, plurals of single numbers are shown using an apostrophe and with a plural noun that already ends in s, the possessive is shown by only using an apostrophe.
Thus, according to the rules, the correct answer will be Option B. The remaining answers are incorrect.