Visual COBOL MCQ 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 Manjunath1987
M
Manjunath1987
Community Contributor
Quizzes Created: 7 | Total Attempts: 3,789
Questions: 20 | Attempts: 115

SettingsSettingsSettings
Visual COBOL MCQ Quiz - Quiz


Questions and Answers
  • 1. 

    PIC S9 (4) results 3 bytes. S9 is of .................. clause.

    • A.

      COMP

    • B.

      COMP-1

    • C.

      COMP3

    • D.

      DISPLAY

    Correct Answer
    C. COMP3
    Explanation
    The correct answer is COMP3. PIC S9 (4) indicates that the data item is a signed numeric field with a length of 4 bytes. COMP3 is a COBOL data type that represents a packed decimal number. Packed decimal numbers are used for efficient storage of decimal data and are commonly used in financial calculations.

    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 ____________.

    • A.

      TYPE ERROR

    • B.

      SIZE ERROR

    • C.

      ARITHMETIC ERROR

    • D.

      NONE OF THE ABOVE

    Correct Answer
    B. SIZE ERROR
    Explanation
    If after an arithmetic operation, the result exceeds the largest value that can be accommodated in the result field, the error is called a SIZE ERROR. This error occurs when the result of the arithmetic operation is too large to fit within the designated memory space for the result. It indicates that the size of the result field is not sufficient to hold the calculated value, resulting in an error.

    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, the PIC clause is used to define the format of a variable. In this case, the PIC $ZZ999 indicates that the variable A is a character variable with a maximum length of 5 characters, where the first character is a dollar sign and the remaining four characters can be any digit from 0 to 9.

    The MOVE statement is used to assign the value 985 to the variable A. Since A is defined as a character variable, the value 985 will be stored as a string.

    Therefore, the output would be "$ 985" because the variable A is defined with a maximum length of 5 characters and the value 985 will be right-aligned within the variable, with two spaces before it.

    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 in a programming language eliminates the need for separate entries for repeated data items. It allows for the declaration of arrays or tables, where multiple occurrences of the same data item can be stored in a single entry. This helps to optimize memory usage and simplifies the coding process by reducing the need for repetitive declarations.

    Rate this question:

  • 5. 

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

    • A.

      REDEFINES

    • B.

      QUALIFICATION

    • C.

      RENAMES

    • D.

      ALL THE ABOVE

    Correct Answer
    B. QUALIFICATION
    Explanation
    The correct answer is QUALIFICATION because it allows for the flexibility of defining data-names with the same name. This means that multiple data-names can be defined with the same name, allowing for easier organization and management of data within a program. This can be particularly useful when working with large or complex datasets.

    Rate this question:

  • 6. 

    What is true regarding REDEFINES clause? (dataname-2 REDEFINES dataname-1)

    • A.

      At the 01 level in the FILE SECTION

    • B.

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

    • C.

      REDEFINES can only be applicable when 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 is used to allow the same storage location to be referenced by different datanames. It is not dependent on the level number or the levels of the datanames being different. It can be used at any level in the FILE SECTION.

    Rate this question:

  • 7. 

    How do you come out of an EVALUATE statement?

    • A.

      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.

    • B.

      STOP RUN

    • C.

      ESCAPE

    • D.

      SKIP

    Correct Answer
    A. 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.
    Explanation
    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. This means that there is no need to use any of the provided options (STOP RUN, ESCAPE, SKIP) to exit the EVALUATE statement. The control flow will continue normally to the next statement after the EVALUATE block.

    Rate this question:

  • 8. 

    On which column position we can write continuation?

    • A.

      8-11

    • B.

      73-80

    • C.

      7

    • D.

      NONE OF THE ABOVE

    Correct Answer
    C. 7
  • 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 memory location, while the OCCURS clause is used to define a repeating group of data items. Therefore, these two clauses cannot be used together in the same data description entry.

    Rate this question:

  • 10. 

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

    • A.

      RENAMES

    • B.

      REDEFINES

    • C.

      USAGE

    • D.

      CONDITION NAME CONDITION

    Correct Answer
    A. RENAMES
    Explanation
    The RENAMES clause must be used only with the special level number 66. This clause allows a data item to be referenced by a different name, providing an alternate way to access the same data. However, it is important to note that this clause should only be used with level number 66, as using it with other level numbers may result in unexpected behavior or errors in the program.

    Rate this question:

  • 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 statement "MOVE A B TO C" is not a valid syntax in most programming languages. The correct syntax for assigning the value of A to C would be "C = A". Therefore, the operation cannot be performed because of 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
    C. 01 COST PIC 999.99
    Explanation
    The correct answer is 01 COST PIC 999.99. This is because the '.' picture character is used to represent a decimal point in COBOL. Therefore, the correct statement is the one that includes the decimal point after the second digit, indicating that the field can have two decimal places.

    Rate this question:

  • 13. 

    A Single  __________ statement can substitute Multiple Arithmetic Statements.

    • A.

      Compute

    • B.

      Perform

    • C.

      Add

    • D.

      All the above

    Correct Answer
    A. Compute
    Explanation
    A single "compute" statement can substitute multiple arithmetic statements because the term "compute" implies the act of performing calculations or mathematical operations. Therefore, by using a single "compute" statement, one can perform multiple arithmetic operations simultaneously, eliminating the need for separate statements for each operation.

    Rate this question:

  • 14. 

    A COBOL word can contain a blank.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    A COBOL word cannot contain a blank. In COBOL, a word is defined as a sequence of characters that starts with an alphabetic character and can be followed by alphabetic characters, digits, or hyphens. It cannot contain any blank spaces. Therefore, the statement "A COBOL word can contain a blank" is false.

    Rate this question:

  • 15. 

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

    Correct Answer
    2359
    Explanation
    The value of "PICTURE" is given as "9999CR" and the corresponding internal representation is "2359". Therefore, the edited value of "PICTURE" is "2359".

    Rate this question:

  • 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 correct answer is DATA DIVISION. In COBOL programming language, the DATA DIVISION is used to define the data structures and variables that will be used in the program. It is responsible for declaring the data types, record layouts, and file structures. The DATA DIVISION is an essential part of the program as it defines the data elements and their characteristics, which are necessary for processing in the PROCEDURE 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." However, without any context or specific question provided, it is impossible to generate an explanation for why "True" is the correct answer.

    Rate this question:

  • 18. 

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

    • A.

      88

    • B.

      Any level between 01 to 49

    • C.

      01

    • D.

      None of the above

    Correct Answer
    C. 01
    Explanation
    The correct answer is 01. This level number indicates the highest level in the data hierarchy and refers to the entire data set contained in it.

    Rate this question:

  • 19. 

    A COBOL word can have national characters.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    COBOL words cannot have national characters. National characters are typically used to represent non-ASCII characters and are not supported in COBOL. Therefore, the correct answer is false.

    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 incorrect. Data names can be defined in various divisions of a program, such as the DATA DIVISION or WORKING-STORAGE SECTION. The PROCEDURE DIVISION is primarily used for writing the actual logic and operations of the program, rather than defining data names. Therefore, the correct answer is False.

    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
  • Mar 10, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • May 17, 2011
    Quiz Created by
    Manjunath1987
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.