Computer Knowledge

Programming Languages and Compilers

2,284 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. -WS-VARIABLE-1

  2. WS-VARIABLE-FOR-THE-COBOL-PROGRAM

  3. WS-VARIABLE-1*-21

  4. 09-01-21-45

  5. WS-VARIABLE-2

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

It meets all the criteria for a COBOL word.

Multiple choice
  1. It translates source code into activities (which may comprise groups of machine instructions) and immediately thereafter executes those activities.

  2. It translates source code directly into assembly language or machine instructions. The eventual end product is a file or files containing machine code.

  3. It combines a list of object modules into an executable program that can be loaded and run by the operating system.

  4. It only enables the programmer to edit the program files.

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

This job is performed by compiler.

Multiple choice
  1. Base Class

  2. Derived Class

  3. No output. A Compilation Error

  4. No output. A Runtime Error

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

Runtime binding of a virtual function based on the object the pointer is pointing to. This is called Runtime Type Identification (RTTI).

Multiple choice
  1. Base Class

  2. Derived Class

  3. No output. A Compilation Error

  4. No output. A Runtime Error

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

Compile time binding of a non-virtual function is based on the data type of the pointer.

Multiple choice
  1. 0

  2. 1

  3. 4

  4. 8

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

An invisible virtual pointer is automatically inserted in a class when at least one of its methods is declared as virtual. The size of a pointer is 4 bytes.