programming languages Online Quiz  232
Description: programming languages Online Quiz  232  
Number of Questions: 20  
Created by: Aliensbrain Bot  
Tags: programming languages 
Which of the option is correct regarding two statements mentioned below :(a) ARITH(EXTEND) is slower than ARITH(COMPAT)(b) AWO is slower than NOAWO

(1) only a is correct

(2) only b is correct

(3) Both a and b are correct

(4) None of them are correct
To understand the given question, the user needs to know the meaning of ARITH(EXTEND), ARITH(COMPAT), AWO, and NOAWO.
ARITH(EXTEND) and ARITH(COMPAT) are compiler options that control the generation of instructions for arithmetic operations. ARITH(EXTEND) generates extendedprecision arithmetic instructions, whereas ARITH(COMPAT) generates instructions for compatibility with earlier IBM processors.
AWO and NOAWO are compiler options that control the use of automatic binary optimization. AWO enables automatic optimization, whereas NOAWO disables it.
Now let's evaluate each statement:
(a) ARITH(EXTEND) is slower than ARITH(COMPAT) This statement is generally true. ARITH(EXTEND) generates extendedprecision arithmetic instructions, which are more complex and require more processing time than ARITH(COMPAT) instructions. Therefore, the statement is correct.
(b) AWO is slower than NOAWO This statement is generally false. AWO enables automatic optimization, which can improve program performance. NOAWO disables optimization, which can result in slower program execution. Therefore, the statement is incorrect.
Therefore, the correct answer is:
The Answer is: A. (1) only a is correct

(1) Extensive Line Processing Area

(2) Extensive Link Pack Area

(3) Extended Link Pack Area

(4) Elusive Line Processing Area
To answer this question, the user needs to be familiar with computer programming terminology, specifically related to mainframe computing.
ELPA stands for "Extended Link Pack Area".
A) Extensive Line Processing Area is incorrect because it is not a commonly used term in computer programming and does not relate to the concept of ELPA.
B) Extensive Link Pack Area is incorrect because it is very similar to the correct answer, but is missing the "Extended" modifier.
C) Extended Link Pack Area is the correct answer because it accurately describes the purpose and function of ELPA.
D) Elusive Line Processing Area is incorrect because it does not accurately describe the purpose or function of ELPA and is not a commonly used term in computer programming.
The answer is: C) Extended Link Pack Area.
Which one of the following is false about CISZ

(1) Smaller CISZ results in faster retrieval for random processing

(2) Larger CISZ results in faster retrieval for sequential processing

(3) CISZ stands for Control interval size

(4) CISZ should be constant for sequential files
AI Explanation
To answer this question, you need to understand the concept of CISZ (Control Interval Size) and its relationship with random and sequential processing.
Option A) (1) Smaller CISZ results in faster retrieval for random processing  This option is correct. In random processing, smaller CISZ allows for faster retrieval because it reduces the amount of data that needs to be read to locate a specific record.
Option B) (2) Larger CISZ results in faster retrieval for sequential processing  This option is correct. In sequential processing, larger CISZ results in faster retrieval because it reduces the number of control intervals that need to be accessed, improving the efficiency of reading records sequentially.
Option C) (3) CISZ stands for Control interval size  This option is correct. CISZ stands for Control Interval Size, which refers to the number of records stored in a control interval in a direct access storage device.
Option D) (4) CISZ should be constant for sequential files  This option is incorrect. CISZ can vary for sequential files. It is generally recommended to have a constant CISZ for random processing to optimize retrieval speed, but for sequential processing, the CISZ can be varied based on factors such as the size of the records and the specific requirements of the application.
The correct answer is D) (4) CISZ should be constant for sequential files. This option is false because CISZ can vary for sequential files.
In general which of following type of access is least efficient in VSAM

(1) Sequential Access

(2) Random Access

(3) Dynamic Access

(4) Depends on the datat in the file
AI Explanation
To answer this question, we need to understand the different types of access methods in VSAM and their efficiency.
Option A) Sequential Access  This option is incorrect. Sequential access is an efficient access method in VSAM because it allows for sequential reading or writing of records in the order they are stored in the file.
Option B) Random Access  This option is correct. Random access in VSAM involves directly accessing a specific record using an index or key. This type of access requires additional processing time to locate the desired record, making it less efficient compared to sequential access.
Option C) Dynamic Access  This option is incorrect. Dynamic access is a combination of sequential and random access, allowing for both sequential and direct access to records. It is an efficient access method as it provides flexibility in accessing the data.
Option D) Depends on the data in the file  This option is incorrect. The efficiency of access in VSAM does not solely depend on the data in the file. It depends on the access method used, as discussed in options A, B, and C.
Therefore, the correct answer is Option B) Random Access. Random access is the least efficient access method in VSAM due to the additional processing time required to locate specific records.
When using binary (COMP) data items, the use of the SYNCHRONIZED clause specifies that

(1) The binary data items will be properly aligned only on halfword boundaries.

(2) The binary data items will be properly aligned only on fullword boundaries.

(3) The binary data items will be properly aligned only on doubleword boundaries.

(4) The binary data items will be properly aligned on halfword, fullword, or doubleword boundaries.
To solve this question, the user needs to know about the SYNCHRONIZED clause in COBOL and how it affects binary data items.
The SYNCHRONIZED clause in COBOL is used to specify the alignment of data items in memory. When used with binary data items, it ensures that the data is stored in a way that is compatible with the hardware on which the program is running.
Now, let's go through each option and explain why it is right or wrong:
A. (1) The binary data items will be properly aligned only on halfword boundaries. This option is incorrect because the SYNCHRONIZED clause does not restrict the alignment to halfword boundaries only.
B. (2) The binary data items will be properly aligned only on fullword boundaries. This option is incorrect because the SYNCHRONIZED clause does not restrict the alignment to fullword boundaries only.
C. (3) The binary data items will be properly aligned only on doubleword boundaries. This option is incorrect because the SYNCHRONIZED clause does not restrict the alignment to doubleword boundaries only.
D. (4) The binary data items will be properly aligned on halfword, fullword, or doubleword boundaries. This option is correct. When the SYNCHRONIZED clause is used with binary data items, it can specify that the data should be aligned on halfword, fullword, or doubleword boundaries, depending on the value specified.
Therefore, the answer is: D.

(1) 1% slower than,38% slower

(2) 10% slower than,4% slower

(3) 1% faster than,38% faster

(4) 10% faster than,4% faster
In terms of Performance considerations for PACKEDDECIMAL,the following statement is true.....

(1) Using an odd number of digits is 10% to 30% slower than using an even number of digits

(2) Using an even number of digits is 10% to 30% faster than using an odd number of digits

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

(4) Using an odd number of digits is 5% to 20% faster than using an even number of digits
To answer this question, the user needs to have some basic understanding of PackedDecimal and its performance considerations.
PackedDecimal is a data format used in computer systems to store decimal numbers efficiently. It stores two digits in a single byte, allowing for more efficient storage of decimal values. In terms of performance, the number of digits used in PackedDecimal can affect the speed of operations involving these values.
Now, let's go through each option and determine which statement is true:
A. (1) Using an odd number of digits is 10% to 30% slower than using an even number of digits  This statement is false. According to performance benchmarks, using an odd number of digits in PackedDecimal is actually faster than using an even number of digits.
B. (2) Using an even number of digits is 10% to 30% faster than using an odd number of digits  This statement is false. As mentioned, using an odd number of digits is actually faster than using an even number of digits.
C. (3) Using an odd number of digits is 5% to 20% slower than using an even number of digits  This statement is also false. Using an odd number of digits is faster, not slower, than using an even number of digits.
D. (4) Using an odd number of digits is 5% to 20% faster than using an even number of digits  This statement is true. According to performance benchmarks, using an odd number of digits in PackedDecimal is 5% to 20% faster than using an even number of digits.
Therefore, the correct answer to this question is:
The Answer is: D. (4) Using an odd number of digits is 5% to 20% faster than using an even number of digits.
The ARITH(EXTEND) compiler option allows you to control the maximum number of digits is ?

(1) 40

(2) 45

(3) 31

(4) 18
AI Explanation
To answer this question, we need to understand the purpose of the ARITH(EXTEND) compiler option and how it affects the maximum number of digits.
The ARITH(EXTEND) compiler option is used to enable extended arithmetic in programs. When this option is specified, the compiler allows calculations with larger numbers and a greater number of digits.
Now, let's go through each option to understand which one is correct:
Option A) (1) 40  This option is incorrect because it specifies that the maximum number of digits is 40, which is not correct according to the given information.
Option B) (2) 45  This option is incorrect because it specifies that the maximum number of digits is 45, which is not correct according to the given information.
Option C) (3) 31  This option is correct because it specifies that the maximum number of digits is 31, which aligns with the given correct answer.
Option D) (4) 18  This option is incorrect because it specifies that the maximum number of digits is 18, which is not correct according to the given information.
Therefore, the correct answer is Option C) (3) 31. This option is correct because it correctly specifies the maximum number of digits allowed when the ARITH(EXTEND) compiler option is used.
The ARITH(COMPAT) compiler option allows you to control the maximum number of digits is?

(1) 40

(2) 45

(3) 31

(4) 18
AI Explanation
To answer this question, we need to understand the purpose and functionality of the ARITH(COMPAT) compiler option.
The ARITH(COMPAT) compiler option is used to control the maximum number of digits allowed in arithmetic calculations in a program. It ensures compatibility with older versions of the programming language.
Now let's go through each option to determine the correct answer:
Option A) (1) 40  This option is incorrect because it does not match the correct answer given.
Option B) (2) 45  This option is incorrect because it does not match the correct answer given.
Option C) (3) 31  This option is incorrect because it does not match the correct answer given.
Option D) (4) 18  This option is correct because it matches the correct answer given. The ARITH(COMPAT) compiler option allows you to control the maximum number of digits to 18.
Therefore, the correct answer is D) (4) 18.
An exception can be caught by a catch block with an argument type that is a superclass of the thrown exception.

True

False
a method cannot be declared as throwing more than one exception.

True

False
can you have a final abstract class?

True

False
an abstract class can have a constructor?

True

False
It is legal to access a static method using an instance of the class?

True

False
assuming all variables are declared and initialized properly this will compile. for(i=l; k< 5; j++){};

True

False
EJB stands for ....

Enterprise Java Bean

Enter Java Bean

Exceptional Java Bean

Event Java Bean
It is not possible to have an instance of a nonstatic inner class before any instances of the outer class have been created.

True

False

True

False
This is legal. float f = 2;

Yes

No

Compile error

Don't know
Static variables are implicitly final.

True

False