0

programming languages Online Quiz - 242

Description: programming languages Online Quiz - 242
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

Which keyword allocates the largest available volume for the dataset?

  1. CONTIG

  2. MXIG

  3. ROUND

  4. RLSE


Correct Option: B
  1. true

  2. false

  3. 25

  4. The expression does not compile as ne is not a valid operator.


Correct Option: B

Which one of the following is used to print the dump of the abended job in an unformatted way?

  1. SYSOUT

  2. SYSABEND

  3. SYSUDUMP

  4. SYSMDUMP


Correct Option: D
  1. true

  2. false

  3. catcap

  4. The expression does not compile as gt operator cannot be applied on strings.


Correct Option: A

Which one of the following keyword a PROC cannot have?

  1. EXEC

  2. SYSABEND

  3. JOBLIB

  4. SYSPRINT


Correct Option: C

How many numbers are printed, when the following JSTL code fragment is executed? Select the one correct answer. ${item} a)1 b)5 c)6 d)11

  1. 1

  2. 5

  3. 6

  4. 11


Correct Option: C
  1. The JSTL code does not compile as an attribute for forEach tag is not correct.

  2. 0

  3. 2

  4. ABC

  5. Nothing gets printed as c.out statement does not get executed.


Correct Option: B

Which library will have the load modules of the IBM utilities?

  1. SYS1.LINKLIB

  2. SYS1.SOTREPROC

  3. SYS1.CATPROC

  4. SYS1.PROCLIB


Correct Option: A
  1. No number gets printed.

  2. One number gets printed.

  3. Two numbers gets printed.

  4. Three numbers gets printed.

  5. Four numbers gets printed.


Correct Option: B
Explanation:

To solve this question, the user needs to know the working of the JSTL choose tag and the conditions used in the when tags.

The code fragment defines a variable 'item' whose value is set to 2. The code then goes on to use the choose tag which is used for conditional processing. The choose tag contains multiple when tags. The when tags are evaluated in the order they are written, and the first condition that is true gets executed. If none of the conditions is true, the code in the otherwise tag is executed.

Looking at the code, the value of the 'item' variable is 2. The first condition in the when tags is "${item>0}" which is true for the given value of item. Therefore, the code inside the first when tag is executed which prints the number 1. The code doesn't go on to evaluate the other when tags because the first condition is true.

So, the answer is:

The Answer is: B. One number gets printed.

If DISP=(,CATLG) which is the correct one?

  1. DISP=NEW,CATLG,CATLG

  2. DISP=OLD,DELETE,CATLG

  3. DISP=NEW,CATLG,DELETE

  4. DISP=OLD,CATLG,CATLG


Correct Option: A

Which numbers gets printed when the following JSTL code fragment is executed? Select the two correct answers.

  1. 1

  2. 2

  3. 3

  4. 4

  5. abc


Correct Option: B,C

Which numbers gets printed when the following JSTL code fragment is executed? Select the two correct answers.

  1. 2

  2. 3

  3. 4

  4. abc


Correct Option: B,C

A JSP file uses a tag as . The myTag element here should be defined in the tag library descriptor file in the tag element using which element. Select the one correct answer.

  1. tagname

  2. name

  3. tag

  4. prefix


Correct Option: B
Explanation:

To solve this question, the user needs to know about JSP and the syntax for defining custom tags in JSP using a tag library descriptor file. Specifically, the user should be familiar with the elements used in the tag library descriptor file.

In this case, the JSP file is using a custom tag defined in a tag library descriptor file. The myTag element in the JSP file should be defined in the tag library descriptor file using the "name" attribute in the "tag" element.

Now, let's go through each option and determine which one is correct:

A. tagname: This is not a valid option for defining a custom tag in a tag library descriptor file.

B. name: This is the correct answer. The "name" attribute in the "tag" element is used to define the name of the custom tag being defined in the tag library descriptor file.

C. tag: The "tag" element is used to define a custom tag in the tag library descriptor file, but it does not specify the name of the tag.

D. prefix: The "prefix" attribute in the "taglib" element is used to specify the prefix used for the custom tag library in the JSP file, but it does not define the custom tag itself.

Therefore, the correct answer is:

The Answer is: B. name

- Hide questions