Multiple Programming Languages Quiz: XML/XSD, Perl, SAS, and Java
Test your knowledge across multiple programming languages including XML Schema Definition, Perl scripting, SAS data processing, and Java programming concepts.
Questions
Which ALL are true?
- A finalizer may NOT be invoked explicitly.
- The finalize method declared in class Object takes no action
- super.finalize() is called implicitly by any overriding finalize method
- The finalize method for a given object will be called no more than once by the garbage collector
- The order in which finalize will be called on two objects is based on the order in which the two objects became finalizable
String[] elements = { “for”, “tea”, “too” }; String first = (elements.length > 0)? elements[0] null; What is the result?
- Compilation fails.
- An exception is thrown at runtime
- The variable first is set to null.
- The variable first is set to elements[0].
Given: System.out.format(”Pi is approximately %d.”, Math.PI); What is the result?
- Compilation fails.
- Pi is approximately 3.
- Pi is approximately 3.141593
- An exception is thrown at runtime
Variables are not interpolated inside which operator when used normally?
- " "
- < >
- ' '
- / /
Which of the following statements are correct when using the RETAINstatement?
- Variables read with the SET statement will not be affected by it
- The RETAIN statement is used when a variable needs to be
- Variables will be initialized to the desired value in each iteration
- Variables are created during execution
x='Hello' y=transwrd(x,'He','HiHiHe') what is the length of y?
- 200
- 9
- 5
- 10
What is true about ERROR statement
- It will be initialised to 1 in the begining
- It will have the observation number that caused the error
- It will not be dropped while writing into the dataset
- It can be used in expressions
p = 5461;x='1001';a=x ||'/'||pWhat is the value of a?
- 1001/ 5461
- Error because of concatenating character and numeric variable
- 1001/ 5461
- 1001/5461
data test; input @1 sal 6.; datalines; $1,234 ; run; What is the value of sal in the test dataset?
- Error because of giving formats while the format statement is not provided
- Missing
- 1234
- $1,234
Which of the following when evaluated are false?
- 1 and 4
- 2 and 4
- 3 and 1
- 2 and 3
how many elements are assigned to @u,@w?
- 1 and 2
- 5 and 0
- 1 and 3
- none of the above
What happens when @_ is modified?
- when arrays and references are passed
- only when references are passed
- args are not changed
- Command line args are changed
what is the output for printf ("%06.2f", $amt) when $amt = 9.355 ?
- 9.3550
- 9.4
- 009.40
- Error
What is the outcome of the scenario : open(FH, ">c:\temp\notes.txt") ?
- Opens a file notes.txt
- fails to create a file and displays error
- fails to open a file but doesn't display error
- Opens a file but not notes.txt
the regex /g.d?c*/ doesn't matches
- godccc
- gddd
- goc
- gc
which is correct?
- 1 can only be called with predecleration of complex_num
- 1 and 2 are same
- 2 can only be called with predecleration of complex_num
- 1 is reference to a subroutine
what does the structure create?
- A list of hashes which contains a list
- A hash of hashes which contains a list
- A list of list which contains another list
- A list of arrays and hashes containing lists
XML Schema is developed by?
- World Wide Web Consortium
- SWIFT
- Sun
- SAP
How many primitive data types does XSD provide?
- 4
- 8
- 10
- 19
What is the root element in XSD?
- <schema>
- <xsd>
- <root>
- <xml>