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
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).
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.
-
Hyper Text Markup Languauge
-
Hyper Tension Maker Language
-
Hyper Text Makeup Language
-
Hyper Test Markup Language
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.
-
Message Processing
-
Serialization
-
Single Document Interface
-
Multiple Document Interface
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.
-
DDName::FILE-STATUS
-
FILE-STATUS::DDName
-
DDName:FILE-STATUS
-
None of the above
C
Correct answer
Explanation
To check the status of an I/O operation on a file in Easytrieve, you use the syntax DDName:FILE-STATUS. This references the file status field associated with a specific DDName. The colon is the correct delimiter.
-
Java Virtual Machine
-
Java Programming Language
-
Java Application Programming Interface
-
1, 2 & 3
-
1 & 3
-
2 & 3
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.
-
A. Call the ADO.Close function
-
B. Use the close method for the RecordSet object
-
C. Set the RecordSet and Connection objects equal to Nothing
-
D. Use the close method for the RecordSet and Connection objects
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.
-
IGYWCL
-
IEWL
-
IEBCOMPILE
-
IGYCRCTL
D
Correct answer
Explanation
IGYCRCTL is the IBM COBOL compiler program. IGYWCL is not a valid program name. IEWL is the link editor, not a compiler. IEBCOMPILE is not an IBM utility program. The 'IGY' prefix identifies IBM COBOL products.
-
.NET Framework 2.0 CLR was introduced with Visual Studio 2005
-
.NET Framework 3.0 uses the .NET Framework 2.0 CLR
-
.NET Framework 3.5 uses the .NET Framework 2.0 CLR
-
.NET Framework 3.5 SP1 first time introduced the .NET Framework 3.0 CLR
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.
-
Extension methods
-
Lambda Expression
-
Abstract methods
-
Expression trees
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.
-
Shadowing
-
Late Binding
-
.NET Reflection
-
All of the above
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.
-
using NotInheritable
-
using sealed
-
both a and b
-
none of the above
A
Correct answer
Explanation
In VB.NET, NotInheritable is the keyword that prevents a class from being inherited (makes it non-derivable/sealed). 'sealed' is a C# keyword, not VB.NET syntax.
-
Structured Exception Handling
-
Unstructured Exception Handling
-
Both A and B
-
None of the Above
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.
-
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;
-
SELECT (A); WHEN (0) PUT LIST(‘A = 0‘); WHEN (5) PUT LIST (‘A = 5‘); OTHERWISE PUT LIST (‘A IS NOT 0 NOR 5’); END;
-
SELECT; WHEN (A=0) PUT LIST(‘A = 0‘); WHEN (5) PUT LIST (‘A = 5‘); OTHERWISE PUT LIST (‘A IS NOT 0 NOR 5’); END;
-
All of the above
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.
-
Object oriented programming
-
Subject oriented programming
-
Video game programming
-
Esoteric programming
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.