programming languages Online Quiz - 233
Description: programming languages Online Quiz - 233 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
-
True
-
False
-
(1) Opens the external file for output and checks the file status code
-
(2) The main program, which calls all the subprograms and then verifies the contents of a record area
-
(3) Opens the external file for input and checks the file status code
-
(4) Reads a record from the external file and checks the file status code
-
(1) It reads a record from the internal Record.
-
(2) Reads a record from the external file and checks the file status code
-
(3) The main program, which calls all the subprograms and then verifies the contents of a record area
-
(4) Reads a record from the external file,checks the file status code and writes the same record into the external file.
-
(1) FILE-CONTROL
-
(2) FILE SECTION
-
(3) WORKING-STORAGE SECTION
-
(4) Procedure division
-
(1) FILE-CONTROL
-
(2) FILE SECTION
-
(3) WORKING-STORAGE SECTION
-
(4) Procedure division
-
(1) Random access
-
(2) Static access
-
(3) Dynamic access
-
(4) Sequential access
-
(1) USING PICTURE Clause
-
(2) The USAGE IS FUNCTION-POINTER clause
-
(3) The USAGE IS PROCEDURE-POINTER clause
-
(4) The USAGE IS FUNCTION-ADDRESS clause
To answer this question, the user needs to have knowledge about procedure pointers in COBOL.
Option A is incorrect because the USING PICTURE clause is used to define the picture of data items.
Option B is incorrect because the USAGE IS FUNCTION-POINTER clause is used to define function pointers, not procedure pointers.
Option C is the correct answer. The USAGE IS PROCEDURE-POINTER clause is used to define procedure pointers in COBOL. Procedure pointers are data items that store the addresses of procedures.
Option D is incorrect because the USAGE IS FUNCTION-ADDRESS clause is used to define a data item that stores the address of a function, not a procedure.
Therefore, the answer is:
The Answer is: C. (3) The USAGE IS PROCEDURE-POINTER clause.
-
(1) Using 5 to 9 digits is 35% faster than using 1 to 4 digits.
-
(2) Using 10 to 18 digits is 2200% slower than using 1 to 4 digits.
-
(3) using an odd number of digits is 5% to 20% faster than using an even number of digits
-
(4) Using the 16 to 18 digits is up to 140% slower than using 1 to 15 digits
-
(1) Dynamic entry point
-
(2) Alternate entry point
-
(3) Static entry point
-
(4) Normarl enrty Point
To answer this question, the user needs to know about COBOL programs, entry points, and the use of the ENTRY label.
The ENTRY label in a COBOL program is used to specify another entry point at which a program will begin running. This allows the program to be executed from different starting points within the same program. The use of an alternate entry point enables a program to be divided into smaller, more manageable components.
Now, let's go through each option and explain why it is right or wrong:
A. (1) Dynamic entry point: This option is incorrect. Dynamic entry point refers to the ability of a program to call another program or subroutine at run time, rather than at compile time.
B. (2) Alternate entry point: This option is correct. The use of the ENTRY label in a COBOL program specifies an alternate entry point at which a program will begin running.
C. (3) Static entry point: This option is incorrect. A static entry point is a fixed starting point within a program that is determined at compile time.
D. (4) Normal entry point: This option is incorrect. There is no such term as a normal entry point in COBOL programming.
Therefore, the answer is: B. (2) Alternate entry point
In COBOL, IMS message processing programs (MPPs) do not use non-IMS input or output statements such as READ, WRITE, REWRITE, OPEN, and CLOSE
-
True
-
False
To solve this question, the user needs to know about COBOL programming in the context of IMS message processing programs (MPPs).
The statement is true. IMS message processing programs (MPPs) do not use non-IMS input or output statements such as READ, WRITE, REWRITE, OPEN, and CLOSE. Instead, they use IMS-specific input and output statements such as GU, GN, GV, and GN.
Option A is correct.
Option B is incorrect because the statement is true, so option A is the correct answer.
The Answer is: A
What is the Performance considerations using FASTSRT?
-
(1) One program that processed 100,000 records was 35% faster when using FASTSRT compared to using NOFASTSRT
-
(2) One program that processed 100,000 records was 35% slower when using FASTSRT Compared to using NOFASTSRT
-
(3) One program that processed using FASTSRT and NOFASTSRT are ssame.
-
(4) None of the above
-
(1) C/C++-to-COBOL programs calls
-
(2) COBOL-to-C/C++ programs calls
-
(3) COBOL-to-COBOL programs calls
-
(4) C/C++-to-C/C++ programs calls
To answer this question, the user needs to know the difference between procedure pointers and function pointers and their respective use cases.
A function pointer is a pointer that points to a function. It can be used to call the function that it points to. A procedure pointer, on the other hand, is a pointer that points to a procedure. A procedure is similar to a function but does not return a value.
Now, let's go through each option and see which one is correct:
A. (1) C/C++-to-COBOL programs calls: This option is incorrect. Procedure pointers are not typically used in C/C++-to-COBOL programs calls. Instead, function pointers are used for this type of program.
B. (2) COBOL-to-C/C++ programs calls: This option is incorrect. Procedure pointers are not typically used in COBOL-to-C/C++ program calls. Instead, function pointers are used for this type of program.
C. (3) COBOL-to-COBOL programs calls: This option is correct. Procedure pointers are more efficient than function pointers for COBOL-to-COBOL program calls. This is because COBOL does not support function pointers, so procedure pointers must be used instead.
D. (4) C/C++-to-C/C++ programs calls: This option is incorrect. Function pointers are typically used for C/C++-to-C/C++ program calls, not procedure pointers.
Therefore, the correct answer is:
The Answer is: C. (3) COBOL-to-COBOL programs calls
what is the benefit of Using an external file ?
-
(1) Even though the main program does not contain any input or output statements, it can reference the record area of the file.
-
(2) Each subprogram can control a single input or output function, such as OPEN or READ.
-
(3) Each program has access to the file.
-
(4) All the above
To answer this question, the user needs to have knowledge about the concept of using an external file.
Option A is incorrect because it does not fully explain the benefit of using an external file. While it is true that the main program can reference the record area of the file even if it does not have input or output statements, this is not the main benefit of using an external file.
Option B is incorrect because it is a specific benefit that applies only to subprograms. It does not explain the general benefit of using an external file.
Option C is incorrect because it is too general. It does not explain the specific benefit of using an external file.
Option D is the correct answer because it includes all the benefits of using an external file. These include the ability for the main program to access the record area of the file, the ability for subprograms to control specific input or output functions, and the fact that multiple programs can have access to the same file.
Therefore, the answer is: D. (4) All the above.
Why we use NAME Compiler Option?
-
(1) Use NAME to generate a link-edit NAME card for each object module.
-
(2) You can also use NAME to generate names for each load module when you are doing batch compilations.
-
(3) When NAME is specified, a NAME card is appended to each object module that is created
-
(4) All the above.
AI Explanation
To answer this question, let's go through each option to understand why it is correct or incorrect:
Option A) (1) Use NAME to generate a link-edit NAME card for each object module. This option is correct. The NAME compiler option can be used to generate a link-edit NAME card for each object module. This allows the programmer to specify a name for the object module that can be used during the link-edit process.
Option B) (2) You can also use NAME to generate names for each load module when you are doing batch compilations. This option is incorrect. The NAME compiler option is used to generate a link-edit NAME card for each object module, not for generating names for load modules during batch compilations.
Option C) (3) When NAME is specified, a NAME card is appended to each object module that is created. This option is correct. When the NAME compiler option is specified, a NAME card is appended to each object module that is created. This allows the programmer to specify a name for the object module.
Option D) (4) All the above. This option is correct. Both option A and option C are correct statements about the use of the NAME compiler option.
The correct answer is D) (4) All the above. This option is correct because it includes all the correct statements about the use of the NAME compiler option.
What is the Performance considerations using AWO?
-
(1) One program using variable-length files and AWO was 88% slower than NOAWO.
-
(2) On the average, AWO was equivalent to NOAWO
-
(3) One program using variable-length files and AWO was 88% faster than NOAWO
-
(4) All the above
AI Explanation
To answer this question, we need to understand the performance considerations when using Asynchronous Write Operations (AWO) compared to not using AWO.
Option A) (1) One program using variable-length files and AWO was 88% slower than NOAWO. AWO is designed to improve performance by allowing write operations to be performed asynchronously, meaning they can be executed concurrently with other operations. However, in this option, it states that a program using AWO was 88% slower than a program without AWO. This means that the use of AWO negatively impacted the program's performance, which contradicts the purpose of AWO. Therefore, this option is incorrect.
Option B) (2) On the average, AWO was equivalent to NOAWO. This option states that, on average, AWO and NOAWO (not using AWO) have similar performance. This implies that the use of AWO does not significantly impact the program's performance compared to not using AWO. Therefore, this option is plausible.
Option C) (3) One program using variable-length files and AWO was 88% faster than NOAWO. This option states that a program using AWO was 88% faster than a program without AWO. This suggests that the use of AWO significantly improved the program's performance compared to not using AWO. Therefore, this option is plausible.
Option D) (4) All the above. Option D states that all the previous options are correct. However, since option A is incorrect, option D cannot be correct.
Based on the explanations above, the correct answer is Option C) (3) One program using variable-length files and AWO was 88% faster than NOAWO. This option correctly states that AWO improved the program's performance compared to not using AWO.
With Enterprise COBOL, we can not invoke IMS facilities using the CBLTDLI call interface
-
True
-
False
To solve this question, the user needs to know what Enterprise COBOL and CBLTDLI are and their relation to IMS facilities.
CBLTDLI is a COBOL language feature that provides a call interface to the IMS DL/I database management system. It enables COBOL programs to access and manipulate IMS databases. Enterprise COBOL is a COBOL compiler developed by IBM for the z/OS operating system.
Now, let's go through each option and explain why it is right or wrong:
A. True: This option is incorrect. Enterprise COBOL supports the CBLTDLI call interface and allows COBOL programs to invoke IMS facilities. Therefore, option A is false.
B. False: This option is correct. Enterprise COBOL supports the CBLTDLI call interface, which enables COBOL programs to access IMS facilities. Therefore, option B is the correct answer.
The Answer is: B
What is mean by EF1OPENI?
-
(1) Reads a record from the external file and checks the file status code
-
(2) The main program, which calls all the subprograms and then verifies the contents of a record area
-
(3) Opens the external file for input and checks the file status code
-
(4) Opens the external file for input and checks the file status code
Which one is true in the following statements?
-
(1) A smaller CISZ results in faster retrieval for random processing at the expense of inserts
-
(2) A larger CISZ is less efficient for sequential processing
-
(3) A larger CISZ is less efficient for random processing
-
(4) A smaller CISZ results in slower retrieval for sequential processing at the expense of inserts
AI Explanation
To answer this question, we need to understand the concept of CISZ (Clustered Index Scan Zone) and its relationship with random and sequential processing.
A CISZ is a continuous block of data within a clustered index that can be read efficiently during a scan operation. The size of the CISZ is determined by the fill factor, which is the percentage of space used in a data page.
Let's go through each statement to determine which one is true:
Statement (1) - A smaller CISZ results in faster retrieval for random processing at the expense of inserts. This statement is true. A smaller CISZ means that more data pages need to be accessed during random processing, resulting in faster retrieval. However, smaller CISZ also means that more data pages need to be split and inserted when new data is added, which can slow down inserts.
Statement (2) - A larger CISZ is less efficient for sequential processing. This statement is false. A larger CISZ is more efficient for sequential processing because it allows for larger data reads, reducing the number of I/O operations required. Sequential processing involves reading data in a continuous manner, and a larger CISZ can accommodate larger data blocks, improving performance.
Statement (3) - A larger CISZ is less efficient for random processing. This statement is false. A larger CISZ can actually be more efficient for random processing. With a larger CISZ, more data can be read in a single I/O operation, reducing the number of disk accesses required for random retrieval.
Statement (4) - A smaller CISZ results in slower retrieval for sequential processing at the expense of inserts. This statement is false. A smaller CISZ can actually result in faster retrieval for sequential processing. Sequential processing involves reading data in a continuous manner, and a smaller CISZ means that fewer data pages need to be accessed, reducing the I/O operations required.
Based on the explanations above, the correct statement is (1) - A smaller CISZ results in faster retrieval for random processing at the expense of inserts.
LINKAGE SECTION of the calling program contains?
-
(1) All data-names which have been used in program
-
(2) The description of the department code that is passed, using the USING clause of the CALL statement
-
(3) Address of the deparment code that is passed ,using the USING clause of the CALL statement
-
(4) All the above
AI Explanation
To answer this question, we need to understand the purpose of the LINKAGE SECTION in a calling program.
The LINKAGE SECTION is used to define the parameters or arguments that are passed to a called program or subroutine using the CALL statement. It defines the data items that are passed from the calling program to the called program.
Let's go through each option to understand why it is correct or incorrect:
Option A) (1) All data-names which have been used in the program - This option is incorrect. The LINKAGE SECTION only contains the data items that are passed to the called program, not all the data-names used in the program.
Option B) (2) The description of the department code that is passed, using the USING clause of the CALL statement - This option is correct. The LINKAGE SECTION contains the description of the department code that is passed to the called program using the USING clause of the CALL statement.
Option C) (3) Address of the department code that is passed, using the USING clause of the CALL statement - This option is incorrect. The LINKAGE SECTION does not contain the address of the data items passed, but rather the description or definition of the data items.
Option D) (4) All the above - This option is incorrect. Option A is incorrect because the LINKAGE SECTION does not contain all the data-names used in the program. Option C is incorrect because the LINKAGE SECTION does not contain the address of the data items passed.
Therefore, the correct answer is B) (2) The description of the department code that is passed, using the USING clause of the CALL statement. This option is correct because the LINKAGE SECTION contains the description of the department code that is passed to the called program using the USING clause of the CALL statement.
-
(1) Compute the arithmetic operations
-
(2) Control the maximum number of digits allowed for decimal numbers
-
(3) Control the inappropriate datatype if it is used by mistake
-
(4) Identify the sign of the variable being used in the program