IBM COBOL Mocktest Quiz

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Sharmiladevi
S
Sharmiladevi
Community Contributor
Quizzes Created: 4 | Total Attempts: 8,514
Questions: 20 | Attempts: 4,551

SettingsSettingsSettings
IBM COBOL Mocktest Quiz - Quiz

COBOL (Common Business-Oriented Language) is a programming language used by programmers at a high level for business applications and is known as the first popular language developed that was unspecific to a certain operating system. It is actually still being used in the business and financial world today despite first appearing as far back as 1959. What can you tell us about COBOL? Take the quiz to find out!


Questions and Answers
  • 1. 

    PIC S9 (4) results 3 bytes

    • A.

      COMP

    • B.

      COMP1

    • C.

      COMP3

    • D.

      DISPLAY

    Correct Answer
    C. COMP3
    Explanation
    The correct answer is COMP3 because PIC S9 (4) indicates that the data is a signed numeric value with a length of 4 digits. COMP3 is a binary format that is commonly used to store packed decimal values, which are numeric values with a fixed number of decimal places. Therefore, COMP3 is the most appropriate choice for storing a signed numeric value with 4 digits.

    Rate this question:

  • 2. 

     If after an arithmetic operation, the result exceeds the largest value that can be accommodated in the result                    field, the error is called a ____________ .

    Correct Answer
    SIZE ERROR
    Explanation
    If the result of an arithmetic operation exceeds the largest value that can be accommodated in the result field, it is considered a SIZE ERROR. This means that the result is too large to fit within the designated storage space, causing an error in the calculation.

    Rate this question:

  • 3. 

    77 A PIC $ZZ999.         MOVE 985 TO A.         What would be the output?                                             

    • A.

      $985

    • B.

      $00985

    • C.

      $ 985

    • D.

      NONE OF THESE

    Correct Answer
    C. $ 985
    Explanation
    The given code snippet is written in COBOL programming language. In COBOL, a PIC (Picture) clause is used to define the format and type of a data item. In this case, the PIC clause "$ZZ999" indicates that the variable A is defined as a 5-digit alphanumeric field, where the first 2 characters are alphabets and the next 3 characters are numeric.

    The MOVE statement is used to assign a value to a variable. Here, the value 985 is being moved to the variable A.

    Therefore, the output would be "$ 985", as the variable A is defined with a leading dollar sign and 3 spaces before the numeric value.

    Rate this question:

  • 4. 

    The   __________ clause eliminates the need for separate entries for repeated data item.                               

    • A.

      REDEFINES

    • B.

      RENAME

    • C.

      USAGE

    • D.

      OCCURS

    Correct Answer
    D. OCCURS
    Explanation
    The OCCURS clause eliminates the need for separate entries for repeated data items. This clause is used in COBOL programming language to define arrays or tables. It allows multiple occurrences of a data item to be stored in a single entry, reducing the need for separate entries for each occurrence.

    Rate this question:

  • 5. 

    ____Gives the Flexibility of Defining Data-names With the Same Name.

    Correct Answer
    QUALIFICATION
    Explanation
    This statement suggests that the feature or concept being described gives the flexibility to define data-names with the same name. The correct answer, "QUALIFICATION," could be referring to a programming language or software feature that allows for the creation of variables or data structures with identical names. This flexibility can be useful in certain situations where multiple variables or data structures with the same name are needed.

    Rate this question:

  • 6. 

    What is true regarding REDEFINES clause?                                    

    • A.

      At the 01 level in the FILE SECTION.

    • B.

      When the levels of dataname-1 and dataname-2 are different.

    • C.

      When the level number is 66 or 88.

    • D.

      Used to allow the same storage location to be referenced by different datanames

    Correct Answer
    D. Used to allow the same storage location to be referenced by different datanames
    Explanation
    The REDEFINES clause in COBOL is used to allow the same storage location to be referenced by different data names. This means that a single memory location can be used to hold different values, depending on which data name is being used to access it. This can be useful in situations where different data items need to share the same memory space, or when a single data item needs to be interpreted in different ways. The other options mentioned in the question are not true regarding the REDEFINES clause.

    Rate this question:

  • 7. 

    After the execution of one of the when clauses, the control is automatically passed on to the next      sentence after the EVALUATE statement. There is no need of any extra code.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    After the execution of one of the when clauses, the control is automatically passed on to the next sentence after the EVALUATE statement. This means that there is no need for any extra code to transfer control to the next sentence. Therefore, the statement is true.

    Rate this question:

  • 8. 

    On which column position we can write continuation                      

    • A.

      8-11

    • B.

      73-80.

    • C.

      7

    • D.

      None

    Correct Answer
    C. 7
    Explanation
    The given answer is column 7. This is because the question asks for the column position where we can write continuation. The options provided are 8-11, 73-80, 7, and none. The first two options are ranges of columns, so they cannot be considered as a single column position for continuation. The option "none" implies that there is no column available for continuation, which contradicts the question. Therefore, the correct answer is column 7.

    Rate this question:

  • 9. 

     The REDEFINES clause can appear in the same data description entry which contains an OCCURS     clause.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    The REDEFINES clause cannot appear in the same data description entry which contains an OCCURS clause. The REDEFINES clause is used to define two or more data items that occupy the same storage location, while the OCCURS clause is used to define a table or array. These two clauses cannot be used together in the same data description entry. Therefore, the given statement is false.

    Rate this question:

  • 10. 

    The __________ CLAUSE must be used only with the special level number 66.  

    Correct Answer
    RENAMES
  • 11. 

     What is the resultant value of C from the statement, if initially A=30 and B=60 MOVE A B TO C.

    • A.

      C=30

    • B.

      C=60

    • C.

      Operation can’t performed because of improper syntax

    • D.

      None.

    Correct Answer
    C. Operation can’t performed because of improper syntax
    Explanation
    The given statement "MOVE A B TO C" is not a valid syntax in any programming language. In order to assign the value of A to C, the correct syntax would be "MOVE A TO C". Therefore, the operation cannot be performed due to improper syntax.

    Rate this question:

  • 12. 

    Which of the following is true related to the ‘.’ Picture character.

    • A.

      01 COST PIC 999V99.9

    • B.

      01 COST PIC 999.99.9

    • C.

      01 COST PIC 999.99

    • D.

      01 COST PIC 9999.

    Correct Answer
    B. 01 COST PIC 999.99.9
    Explanation
    Among the given options, the correct representation related to the '.' picture character in COBOL is:
    01 COST PIC 999.99.9
    In COBOL, the '.' (period) is used as a separator to define the picture clause for numeric data items. The '9' represents a numeric digit, and the '.' is used to separate different parts of the numeric format. The format "999.99.9" indicates a numeric field with three digits to the left of the decimal point, two digits to the right of the first decimal point, and one digit to the right of the second decimal point.

    Rate this question:

  • 13. 

    A Single  __________ statement can substitute Multiple Arithmetic Statements.  

    Correct Answer
    COMPUTE
  • 14. 

    A COBOL word can contain a blank?

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    In COBOL, a word cannot contain a blank. A COBOL word is a sequence of characters that can include letters, digits, and special characters, but it cannot contain spaces or blanks. Therefore, the correct answer is False.

    Rate this question:

  • 15. 

    What is the edited value of the following                      PICTURE      Value        Internal Representation                     9999CR            2359       ______________ 

    Correct Answer
    2359
  • 16. 

    LINKAGE-SECTION present which DIVISION.

    • A.

      IDENTIFICATION DIVISION.

    • B.

      ENVIRONMENT DIVISION.

    • C.

      DATA DIVISION.

    • D.

      PROCEDURE DIVISION.

    Correct Answer
    C. DATA DIVISION.
    Explanation
    The given answer, DATA DIVISION, is correct because the question is asking which division is present in the LINKAGE-SECTION. The LINKAGE-SECTION is a part of the DATA DIVISION in COBOL programming language. It is used to define the data items that are passed between programs or subprograms. Therefore, the correct answer is DATA DIVISION.

    Rate this question:

  • 17. 

    Every Paragraph should end with a Period ( . )

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    The given correct answer is "True."

    Rate this question:

  • 18. 

    _______ level number indicates highest level in data hierarchy & refers to entire data set contained in it.

    Correct Answer
    01
    Explanation
    The given correct answer, "01," indicates the highest level in the data hierarchy and refers to the entire data set contained within it. This level represents the most general and encompassing category of data, which includes all the individual data points and subsets within it.

    Rate this question:

  • 19. 

    A COBOL word can have national characters.               

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    A COBOL word cannot have national characters.

    Rate this question:

  • 20. 

    Every Data name used in the program must be defined in PROCEDURE DIVISION.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    In the given statement, it is stated that every data name used in the program must be defined in the PROCEDURE DIVISION. However, this statement is false. In COBOL, data names can be defined in various divisions, including the DATA DIVISION, FILE SECTION, and WORKING-STORAGE SECTION. The PROCEDURE DIVISION is responsible for defining the program's logic and does not necessarily involve defining data names.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Sep 26, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jun 30, 2011
    Quiz Created by
    Sharmiladevi
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.