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 programming languages
  1. Constants:x(3) type c value '123'.

  2. Data:x(3) type c.

  3. Constants:x(3) type c.

  4. Data:x(3) type c value '123'.

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology programming languages
  1. All the lines of the table are deleted

  2. The work area is initialized

  3. All the lines of the table are initialized

  4. Nothing

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology platforms and products
  1. COBOL Sources

  2. XML Sources

  3. Salesforce.com Sources

  4. Relational DB Sources

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology platforms and products
  1. COBOL Sources

  2. XML Sources

  3. Salesforce.com Sources

  4. Relational DB Sources

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology platforms and products
  1. COBOL Sources

  2. XML Sources

  3. Salesforce.com Sources

  4. Relational DB Sources

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology databases
  1. INT

  2. XML

  3. CHAR

  4. DOUBLE

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology databases
  1. SMALLINT

  2. NUMERIC

  3. INTEGER

  4. DOUBLE

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology
  1. Before Obj-Open, the step page has to be created using Page-New

  2. The step page can be classless if it is temporary

  3. An instance of a step page with the same name can be reused and the data must be cleared using Page-Reset

  4. An instance of step page with the same name can be reused and the data is cleared automatically.

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology programming languages
  1. @Responses

  2. @AllChildren

  3. @AllDescendents

  4. @AllResponses

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology mainframe
  1. Fixed Block file

  2. Fixed Unblock file

  3. Variable Block file

  4. Variable Unblock file

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology mainframe
  1. 10

  2. 35

  3. 23

  4. 28

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology mainframe
  1. VSAM File

  2. Sequential file

  3. Sequential and VSAM

  4. None

Reveal answer Fill a bubble to check yourself
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.