Tag: programming languages

Questions Related to programming languages

  1. (1) Use the SYNCHRONIZED clause for the file.

  2. (2) Use the EXTERNAL clause for the file.

  3. (3) Use GLOBAL clause for the file.

  4. (4) Use COMMON clause for the file.


Correct Option: B
  1. (1) Opens the external file for output and checks the file status code

  2. (2) The main program, which calls all the subprograms and then verifies the contents of a record area

  3. (3) Opens the external file for input and checks the file status code

  4. (4) Reads a record from the external file and checks the file status code


Correct Option: A
  1. (1) It reads a record from the internal Record.

  2. (2) Reads a record from the external file and checks the file status code

  3. (3) The main program, which calls all the subprograms and then verifies the contents of a record area

  4. (4) Reads a record from the external file,checks the file status code and writes the same record into the external file.


Correct Option: B

EFSELECT comes under

  1. (1) FILE-CONTROL

  2. (2) FILE SECTION

  3. (3) WORKING-STORAGE SECTION

  4. (4) Procedure division


Correct Option: A

EFFILE comes under

  1. (1) FILE-CONTROL

  2. (2) FILE SECTION

  3. (3) WORKING-STORAGE SECTION

  4. (4) Procedure division


Correct Option: B
  1. (1) Random access

  2. (2) Static access

  3. (3) Dynamic access

  4. (4) Sequential access


Correct Option: D
  1. (1) USING PICTURE Clause

  2. (2) The USAGE IS FUNCTION-POINTER clause

  3. (3) The USAGE IS PROCEDURE-POINTER clause

  4. (4) The USAGE IS FUNCTION-ADDRESS clause


Correct Option: C
Explanation:

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. (1) Using 5 to 9 digits is 35% faster than using 1 to 4 digits.

  2. (2) Using 10 to 18 digits is 2200% slower than using 1 to 4 digits.

  3. (3) using an odd number of digits is 5% to 20% faster than using an even number of digits

  4. (4) Using the 16 to 18 digits is up to 140% slower than using 1 to 15 digits


Correct Option: B
  1. (1) Dynamic entry point

  2. (2) Alternate entry point

  3. (3) Static entry point

  4. (4) Normarl enrty Point


Correct Option: B
Explanation:

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