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
-
Constants:x(3) type c value '123'.
-
Data:x(3) type c.
-
Constants:x(3) type c.
-
Data:x(3) type c value '123'.
C
Correct answer
Explanation
In ABAP, CONSTANTS declarations must include a VALUE clause to specify the constant's value. Option C 'Constants:x(3) type c.' lacks the required VALUE clause, causing a syntax error. DATA statements (options B and D) can optionally include values, so they are syntactically valid.
-
All the lines of the table are deleted
-
The work area is initialized
-
All the lines of the table are initialized
-
Nothing
C
Correct answer
Explanation
When CLEAR is used on an internal table without a header line, it initializes all lines of the table body to their initial values. This is different from tables with header lines, where CLEAR might only initialize the header work area. Option C correctly states that all lines are initialized.
C
Correct answer
Explanation
The EXPLAIN facility in Teradata displays the execution plan for a query without actually running it. This shows how the optimizer will process the query, including join strategies, index usage, and data movement steps across AMPs. It's essential for performance tuning.
-
COBOL Sources
-
XML Sources
-
Salesforce.com Sources
-
Relational DB Sources
C
Correct answer
Explanation
Application Source Qualifier in Informatica PowerCenter is specifically designed to work with Salesforce.com sources, allowing data extraction from Salesforce. COBOL sources use COBOL source definitions, XML sources use XML Source Qualifiers, and relational sources use standard Source Qualifiers.
-
COBOL Sources
-
XML Sources
-
Salesforce.com Sources
-
Relational DB Sources
C
Correct answer
Explanation
Application Source Qualifier is specifically used with Salesforce.com sources in Informatica PowerCenter. For COBOL sources you use COBOL source definitions, for XML sources you use XML Source Qualifier, and for relational sources you use standard Source Qualifier.
-
COBOL Sources
-
XML Sources
-
Salesforce.com Sources
-
Relational DB Sources
C
Correct answer
Explanation
The Application Source Qualifier transformation is specifically used with external application sources like Salesforce.com to define the data extraction logic. It is not used for standard relational sources, COBOL sources, or XML sources which have their own appropriate qualifiers. Options A, B, and D use different source qualifier types specific to those source systems.
B
Correct answer
Explanation
In DB2, INT (4 bytes), CHAR (fixed by definition), and DOUBLE (8 bytes) are all fixed-length data types. XML is a variable-length data type because XML documents have inherently unpredictable sizes and are stored using LOB-like mechanisms internally. The XML type dynamically allocates storage based on the actual document size.
-
SMALLINT
-
NUMERIC
-
INTEGER
-
DOUBLE
D
Correct answer
Explanation
Identity columns in DB2 require exact numeric types with a scale of zero (whole numbers): SMALLINT, INTEGER, or BIGINT. DECIMAL/NUMERIC with scale 0 also work. DOUBLE is a floating-point type with imprecise representation and cannot be used for identity columns because identity values must be exact, predictable integers.
-
Before Obj-Open, the step page has to be created using Page-New
-
The step page can be classless if it is temporary
-
An instance of a step page with the same name can be reused and the data must be cleared using Page-Reset
-
An instance of step page with the same name can be reused and the data is cleared automatically.
D
Correct answer
Explanation
When Obj-Open is called, if a step page with the same name already exists, it will reuse that page. Pega automatically clears the existing data on that page before loading the new instance - you don't need to manually call Page-Reset. The step page doesn't need to be created beforehand.
-
IGYWCL
-
IEWL
-
IEBCOMPILE
-
IGYCRCTL
D
Correct answer
Explanation
IGYCRCTL is the actual IBM compiler program name for Enterprise COBOL for z/OS. IGYWCL is a cataloged procedure used to compile and link, while IEWL is the linkage editor.
-
@Responses
-
@AllChildren
-
@AllDescendents
-
@AllResponses
C
Correct answer
Explanation
@AllDescendants is the Lotus Notes formula function that retrieves all response documents AND all response-to-response documents (the entire hierarchy below a parent). @Responses only gets direct responses, while @AllChildren is not a standard function.
-
Fixed Block file
-
Fixed Unblock file
-
Variable Block file
-
Variable Unblock file
A
Correct answer
Explanation
In COBOL, ORGANISATION IS SEQUENTIAL with RECORDING MODE F (Fixed) and BLOCK CONTAINS 0 defines a Fixed Block file. This means records are fixed-length and blocked together for efficient I/O.
-
INDEXED
-
RELATIVE
-
SEQUENTIAL
-
All of the above
D
Correct answer
Explanation
In COBOL, all three file organizations (INDEXED, RELATIVE, and SEQUENTIAL) support all four open modes: INPUT (read-only), I-O (read/write), OUTPUT (write-new), and EXTEND (append).
B
Correct answer
Explanation
In COBOL file status codes, 35 indicates an 'Empty File' condition when attempting to read from a file that exists but contains no records. This is a standard file status code used in COBOL file operations. Code 10 typically indicates end-of-file, while other codes represent different error conditions.
-
VSAM File
-
Sequential file
-
Sequential and VSAM
-
None
C
Correct answer
Explanation
File-Aid is a comprehensive file manipulation tool for IBM mainframes that can browse and edit multiple file types. It supports both Sequential files (flat files processed record-by-record) and VSAM files (indexed files with complex access methods), making option C correct.