1.
Which of the following is a valid COBOL word?
Correct Answer
A. B12-4
Explanation
The valid COBOL word in the given options is B12-4. COBOL words can consist of letters, digits, and hyphens, but they cannot start with a hyphen. Therefore, options like –GROSS- and OVER TIME are not valid COBOL words. GROSS_SALARY is also not a valid COBOL word because COBOL does not allow the use of underscores in word names.
2.
Which of the following is not a figurative constant?
Correct Answer
C. BLANK
Explanation
The other options, SPACES, QUOTE, and LOW-VALUE, are all figurative constants commonly used in programming languages. These constants represent specific characters or values. However, BLANK is not a recognized figurative constant in most programming languages.
3.
What is the edited value of the picture clause
PIC field 9999+
Numeric value moved to the field -382 and the Edited value is
Correct Answer
0382-
4.
Which division is used to specify the computer used by the program?
Correct Answer
B. Environment Division
Explanation
The Environment Division is used to specify the computer used by the program. This division contains information about the hardware and software environment in which the program runs, such as the computer type, operating system, and input/output devices. It helps the program to interact with the specific computer system and perform necessary operations.
5.
Initially A=30, B=60
IF A = 40
DISPLAY ‘ABC’
ELSE
NEXT SENTENCE
END-IF
MOVE 90 TO B.
DISPLAY B.
What is the output of the program?
Correct Answer
B. 60
Explanation
The output of the program is 60. Initially, the values of A and B are 30 and 60 respectively. Since A is not equal to 40, the program goes to the ELSE statement and skips the NEXT SENTENCE. Then, the value 90 is moved to B. Finally, the program displays the value of B, which is 60.
6.
In WRITE statement it is required to mention the record name and not the file name.
Correct Answer
A. True
Explanation
The explanation for the correct answer is that in a WRITE statement, it is necessary to specify the name of the record being written, rather than the name of the file. This is because a file can contain multiple records, and the WRITE statement is used to write data into a specific record within the file. By mentioning the record name, the program knows exactly where to write the data.
7.
S9(7) COMP-3 field occupy _________ bytes.
Correct Answer
4
Explanation
The S9(7) COMP-3 field is a packed decimal field that occupies 4 bytes of storage. Packed decimal fields store numeric data in a compressed format, where each digit is represented by a nibble (half a byte). The S9(7) format indicates that the field can hold a signed numeric value with a maximum of 7 digits. Since each digit requires a nibble, and each byte can hold 2 nibbles, the field requires a total of 4 bytes of storage.
8.
________ clause used for the purpose allows the said area to be referred to by more than one data name_____with different sizes and pictures.
Correct Answer
A. JUSTIFIED
9.
A data-name gives references to the storage space to the memory where the actual value is stored.
Correct Answer
A. True
Explanation
A data-name is a reference that points to the specific memory location where the actual value is stored. This means that when we use a data-name, we are actually accessing the value stored in the memory location it refers to. Therefore, the statement is true.
10.
If A=10, B=20, C=30,D=0
ADD A B TO C GIVING D
Then the respective Values of D and C ______________
Correct Answer
E. 60,30
Explanation
The given equation "ADD A B TO C GIVING D" means that the values of A and B should be added together and the result should be stored in C. In this case, A=10 and B=20, so when we add them together, we get C=30. Therefore, the value of C is 30. Additionally, the "GIVING D" part means that the value of C should also be stored in D. So, the value of D is also 30. Therefore, the respective values of D and C are 30, 30.
11.
_______ verb causes the termination of the execution of object program.
Correct Answer
STOP RUN
Explanation
The verb "STOP RUN" is used in programming languages like COBOL to terminate the execution of the object program. It is typically placed at the end of the program to indicate that the program has finished running and should stop executing.
12.
What is the difference between COMP & COMP-3?
Correct Answer
C. COMP represents data(Value) in Binary format, COMP-3 represents in Packed Decimal format
Explanation
The correct answer is that COMP represents data(Value) in Binary format, while COMP-3 represents data(Value) in Packed Decimal format. COMP is used to store integer values in binary form, while COMP-3 is used to store decimal values in packed decimal format. Packed decimal format allows for efficient storage of decimal numbers, as each digit is stored in a nibble (half a byte), reducing the amount of space required compared to storing each digit in a full byte.
13.
Which of the following is false among the statements?
Correct Answer
C. 77 level can be sub divided themselves
Explanation
The statement "77 level can be sub divided themselves" is false. In COBOL, the level number 77 is used to define elementary level items, which cannot be further subdivided. Elementary level items are used to define individual data items such as numbers or characters. On the other hand, higher level numbers like 01, 02, or 88 can be used to define group items or condition names.
14.
For a Literal, Value can be changed at any stage of Program execution.
Correct Answer
B. False
Explanation
The statement is false because for a literal, the value cannot be changed at any stage of program execution. A literal is a fixed value that is directly written in the code and its value remains constant throughout the program. It is not possible to modify or update the value of a literal during program execution.
15.
The USAGE clause can be specified at any level.
Correct Answer
A. True
Explanation
The USAGE clause in a programming language can be specified at any level, which means it can be used in different parts of the code, such as at the global level or within specific functions or blocks. This allows for flexibility in declaring and utilizing variables or resources throughout the program. Therefore, the statement that the USAGE clause can be specified at any level is true.
16.
Which of the following is not a valid delimiter in COBOL?
Correct Answer
C. ; (Semicolon)
Explanation
In COBOL, the semicolon (;) is not a valid delimiter. Delimiters are used to separate different elements in a program, such as statements or data items. In COBOL, the valid delimiters are comma (,), period (.), and space. The semicolon is not recognized as a delimiter in COBOL and would result in a syntax error if used.
17.
In a COBOL program column position range of Area A...................
Correct Answer
E. None of the above
18.
Definition 1 : 77 pic Number1 9(20) value 100.
Definition 2: 02 pic Number2 z(6) value 200.
Correct Answer
C. Definition 1 is Wrong, Definition 2 is Correct
Explanation
Definition 1 is wrong because the data type specified, "pic Number1 9(20)", is not a valid syntax. On the other hand, Definition 2 is correct because the data type specified, "pic Number2 z(6)", is a valid syntax.
19.
The standard left-hand alignment of alphanumeric or alphabetic data can be reversed by using the _________CLAUSE
Correct Answer
B. JUSTIFIED
Explanation
The correct answer is JUSTIFIED. In standard left-hand alignment, alphanumeric or alphabetic data is aligned to the left margin. However, by using the JUSTIFIED clause, the alignment can be reversed, and the data will be aligned to the right margin.
20.
What is the edited value of the following
PICTURE Value Internal Representation
$$$$$ 009 ______________
Correct Answer
B. BBB$9 (Where B represents single blank space)
Explanation
The edited value of the given PICTURE is BBB$9. This is because the original value of PICTURE contains 5 characters ($$$$$), but the internal representation contains only 3 characters (009). Therefore, to match the internal representation, the value of PICTURE needs to be edited to BBB$9, where B represents a single blank space.