0

programming languages Online Quiz - 327

Description: programming languages Online Quiz - 327
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0
  1. public interface Status { 12. /* insert code here */ int MY_VALUE = 10; 13. } Which three are valid on line 12? (Choose three.)
  1. A. final

  2. C. native

  3. F. abstract

  4. G. protected


Correct Option: A

Question 5 Given: 10. interface Foo {} 11. class Alpha implements Foo { } 12. class Beta extends Alpha {} 13. class Delta extends Beta { 14. public static void main( String[] args) { 15. Beta x = new Beta(); 16. // insert code here 17. } 18. } Which code, inserted at line 16, will cause a java.lang.ClassCastException?

  1. B. Foo f= (Delta)x;

  2. A. Alpha a = x;

  3. D. The code on line 31 throws an exception.

  4. C. Foo f= (Alpha)x; D. Beta b = (Beta)(Alpha)x;


Correct Option: A
  1. public interface Status { 12. /* insert code here */ int MY_VALUE = 10; 13. } Which three are valid on line 12? (Choose three.)
  1. A. final

  2. C. native

  3. F. abstract

  4. G. protected


Correct Option: A

Find the output of this program. main() { int i=5; printf(“%d”,i=++i ==6); }

  1. 6

  2. 1

  3. 5

  4. Compiler error


Correct Option: B

Which of the following is used to allocate memory to a program at run time?

  1. ALLOCATE

  2. ALLOC

  3. ALLMEM

  4. LOADM

  5. None of the above


Correct Option: B

Which of the following is the operation code extender for not locking a record on a READ or CHAIN?

  1. L

  2. N

  3. E

  4. P

  5. none of the above


Correct Option: B

What type of object stores spooled files that are waiting to be printed on an output device?

  1. *SPLQ

  2. *PRTQ

  3. *PRTF

  4. *OUTQ


Correct Option: D
  1. They will be blank and/or zero.

  2. They will be null.

  3. They will equal the values of the first record in the file.

  4. They will equal the values of the last record read


Correct Option: D

Given the DOS Specification below and the following information: • Indicator 50 is off • No records have been written to the subfile What will be the result if the EXFMT operation code is performed on the record format CTLR? A R SUBFL A DESCRIP 101 6 1ODSPATR(UL) A DFT(’NOT FOUND’) A R CTLR SFLCTL(SUBFL) A N50 SFLDSP A SFLDSPCTL A SFLINZ A 67 SFIJEND A SFLSIZ(13) A SFLPAG(12) A ACCOUNTNO 100 S 10

  1. Only AccountNo will display

  2. SUBFL will be initialized with 13 blank records

  3. An I/O exception error will occur

  4. The screen will display 12 records with ‘NOT FOUND’


Correct Option: B
- Hide questions