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 technology mainframe
  1. 44

  2. 92

  3. 61

  4. 89

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

File status code 92 in COBOL indicates a logic error occurred during file operations. This typically happens when a program violates file processing rules, such as attempting to read past end-of-file or performing invalid sequential access. Codes 44, 61, and 89 represent different error conditions (duplicate key, file not found, and冲突 situations respectively).

Multiple choice technology mainframe
  1. DYNM

  2. NDYNAM

  3. DYNA

  4. DYNAM

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

The DYNAM compiler option enables dynamic linking in IBM COBOL, allowing subprograms to be loaded and called at runtime rather than statically bound. Options DYNM, NDYNAM, and DYNA are invalid compiler options. Dynamic linking is useful when subprograms may change or when memory management requires flexible loading strategies.

Multiple choice technology operating systems
  1. Hyper Text Markup Languauge

  2. Hyper Tension Maker Language

  3. Hyper Text Makeup Language

  4. Hyper Test Markup Language

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

HTML stands for Hyper Text Markup Language. The question asks about basic computer terminology, and option A correctly identifies what HTML stands for. The other options (Hyper Tension Maker, Hyper Text Makeup, Hyper Test) are incorrect and seem to be distractors designed to test knowledge of the correct acronym.

Multiple choice technology programming languages
  1. Message Processing

  2. Serialization

  3. Single Document Interface

  4. Multiple Document Interface

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

CObject is MFC's root base class that provides serialization support through the Serialize() method and DECLARE_SERIAL/IMPLEMENT_SERIAL macros. Message processing, SDI, and MDI are handled by derived classes like CWinApp, CFrameWnd, and CDocument, not by CObject itself.

Multiple choice technology programming languages
  1. Java Virtual Machine

  2. Java Programming Language

  3. Java Application Programming Interface

  4. 1, 2 & 3

  5. 1 & 3

  6. 2 & 3

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

The Java Platform consists of the Java Virtual Machine (JVM) and the Java Application Programming Interface (API). The Java Programming Language is separate from the platform itself - it's what you write code in, but the platform is what runs it. Therefore, option E (1 & 3) is correct.

Multiple choice technology testing
  1. A. Call the ADO.Close function

  2. B. Use the close method for the RecordSet object

  3. C. Set the RecordSet and Connection objects equal to Nothing

  4. D. Use the close method for the RecordSet and Connection objects

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

To properly clean up database resources in VBScript/ADO, you must explicitly call the .Close method on both the RecordSet and Connection objects to terminate the active session.

Multiple choice technology platforms and products
  1. .NET Framework 2.0 CLR was introduced with Visual Studio 2005

  2. .NET Framework 3.0 uses the .NET Framework 2.0 CLR

  3. .NET Framework 3.5 uses the .NET Framework 2.0 CLR

  4. .NET Framework 3.5 SP1 first time introduced the .NET Framework 3.0 CLR

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

The question asks for the INCORRECT statement. Option D is wrong because .NET Framework 3.5 SP1 did NOT introduce the 3.0 CLR - all versions through 3.5 SP1 used the 2.0 CLR. The 3.0 framework added WPF, WCF, and Workflow but still ran on CLR 2.0. Options A, B, and C correctly state the CLR version lineage.

Multiple choice technology platforms and products
  1. Extension methods

  2. Lambda Expression

  3. Abstract methods

  4. Expression trees

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

Extension methods, introduced in C# 3.0, allow adding methods to existing compiled classes without using inheritance or modifying the original class. They are static methods with special syntax that appear as instance methods of the extended type. Lambda expressions, abstract methods, and expression trees serve different purposes.

Multiple choice technology programming languages
  1. Shadowing

  2. Late Binding

  3. .NET Reflection

  4. All of the above

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

Shadowing (using the Shadows keyword in VB.NET) redefines an inherited member with the same name in a derived class without overriding it, completely replacing the base class member's signature and implementation.

Multiple choice technology programming languages
  1. Structured Exception Handling

  2. Unstructured Exception Handling

  3. Both A and B

  4. None of the Above

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

VB.NET supports both structured exception handling (Try...Catch...Finally blocks) and unstructured exception handling (On Error GoTo statements) for backward compatibility with VB6. This dual approach allows developers to choose modern error handling or legacy-style error management.

Multiple choice technology programming languages
  1. SELECT (A); WHEN (A=0) PUT LIST(‘A = 0‘); WHEN (A=5) PUT LIST (‘A = 5‘); OTHERWISE PUT LIST (‘A IS NOT 0 NOR 5’); END;

  2. SELECT (A); WHEN (0) PUT LIST(‘A = 0‘); WHEN (5) PUT LIST (‘A = 5‘); OTHERWISE PUT LIST (‘A IS NOT 0 NOR 5’); END;

  3. SELECT; WHEN (A=0) PUT LIST(‘A = 0‘); WHEN (5) PUT LIST (‘A = 5‘); OTHERWISE PUT LIST (‘A IS NOT 0 NOR 5’); END;

  4. All of the above

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

Option B is correct because PL/I SELECT statements allow WHEN clauses with simple expressions that evaluate against the selector value. Option A is wrong because WHEN (A=0) is a comparison, not the value itself. Option C is wrong because it omits the selector (A) after SELECT. Option D is wrong since only B is correct.

Multiple choice technology web technology
  1. Object oriented programming

  2. Subject oriented programming

  3. Video game programming

  4. Esoteric programming

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

Whitespace is an esoteric programming language created in 2002 that uses only spaces, tabs, and linefeeds as syntax. It is designed to be unreadable to humans and challenging for compilers, fitting the definition of esoteric programming (languages designed as experiments or jokes rather than practical use). Options A, B, C are incorrect categorizations.