programming languages Online Quiz - 307

programming languages Online Quiz - 307

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

class B { public static void main (String args[]) { Double a = new Double(0xFFFF); byte b = a.byteValue(); short c = a.shortValue(); int e = a.intValue(); long f = a.longValue(); float g = a.floatValue(); double h = a.doubleValue(); System.out.print(b+","+c+","+ (e+f+g+h == 4 * 0xFFFF)); }} What is the result of attempting to compile and run the program?

  1. Prints: 0xFFFF,0xFFFF,false
  2. Prints: 0xFFFF,0xFFFF,true
  3. Prints: -1,-1,false
  4. Prints: -1,-1,true
  5. Compile-time error
Question 2 Multiple Choice (Single Answer)

class C { public static void main(String[] args) { Boolean b1 = Boolean.valueOf(true); Boolean b2 = Boolean.valueOf(true); Boolean b3 = Boolean.valueOf("TrUe"); Boolean b4 = Boolean.valueOf("tRuE"); System.out.print((b1==b2) + ","); System.out.print((b1.booleanValue()==b2.booleanValue()) + ","); System.out.println(b3.equals(b4)); }} What is the result of attempting to compile and run the program?

  1. Prints: false,false,false
  2. Prints: false,false,true
  3. Prints: true,false,false
  4. Prints: true,false,true
  5. Prints: true,true,true
Question 3 Multiple Choice (Single Answer)

class D { static boolean m(double v) { return(v != v == Double.isNaN(v)); } public static void main (String args[]) { double d1 = Double.NaN; double d2 = Double.POSITIVE_INFINITY; double d3 = Double.MAX_VALUE; System.out.print(m(d1) + "," + m(d2) + "," + m(d3)); }} What is the result of attempting to compile and run the program?

  1. Prints: false,false,false
  2. Prints: false,true,false
  3. Prints: true,false,false
  4. Prints: true,true,false
  5. Prints: true,true,true
Question 4 Multiple Choice (Single Answer)

Who Led The C# Development Team?

  1. Safra A. Catz
  2. Charles Phillips
  3. Anders Hejlsberg
  4. Jeffrey O. Henley
Question 5 True/False

Multiple Inheritance Is Supported In C#?

  1. True
  2. False
Question 6 Multiple Choice (Single Answer)

Sub-queries can be nested in…

  1. UPDATE, DELETE, INSERT and SELECT statements.
  2. INSERT statements only.
  3. UPDATE statements only.
  4. DELETE statements only.
Question 7 Multiple Choice (Single Answer)

Documentation System Of C# Is Similar To ?

  1. Javadoc
  2. J#
  3. C++
  4. Cdoc
Question 8 Multiple Choice (Single Answer)

What is a view?

  1. A view is a database diagram.
  2. A view is a virtual table which results of executing a pre-compiled query. A view is not part of the physical database schema, while the regular tables are.
  3. A view is a special stored procedure executed when certain event occurs.
  4. None of the above
Question 9 Multiple Choice (Single Answer)

What is a database cursor?

  1. A blinking vertical line that indicates the location of the next input on the display screen.
  2. A cursor is SQL keyword specifying a retrieved data order.
  3. Cursor is acronym for Current Set Of Records and is a database object pointing to a currently selected set of records.
  4. None of the above
Question 10 True/False

We can use both HAVING and WHERE SQL clauses in one SQL statement.

  1. True
  2. False
Question 11 Multiple Choice (Single Answer)

What is a foreign key?

  1. A foreign key is a key field (column) in a database table, which relates the table to another table where the key is a primary key. The primary - foreign key relations are used to cross-reference database tables.
  2. The foreign key is a SQL locking mechanism.
  3. The foreign key is a column that can have NULL values.
  4. None of the above
Question 12 Multiple Choice (Single Answer)

What does ACID stand for?

  1. Access. Consistency. Isolation. Data.
  2. Access. Constraint. Index. Data.
  3. Atomicity. Consistency. Isolation. Durability.
  4. None of the above
Question 13 Multiple Choice (Single Answer)

What does the term 'locking' refer to?

  1. Locking is the process of database authentication.
  2. Locking is a process preventing users from reading data being changed by other users, and prevents concurrent users from changing the same data at the same time.
  3. Locking is a process, which logs database usage.
  4. None of the above
Question 14 True/False

The COALESCE function always produces integer results.

  1. True
  2. False
Question 15 Multiple Choice (Multiple Answers)

Which Organisations Co-sponsored The Submission Of Specifications For C#?

  1. Microsoft
  2. HP
  3. Intel
  4. Borland
Question 16 True/False

There are two syntax options for the CASE statement but they both provide the exact same functionality.

  1. True
  2. False
Question 17 True/False

There is no way to know ahead of time if you will get a Cartesian product for an answer result.

  1. True
  2. False
Question 18 Multiple Choice (Single Answer)

Which of the following functions would you need to solve the question below: Show sales figures for March incremented daily with a final total.

  1. Cumulative Sum
  2. Moving Sum
  3. RANK
  4. None of the above
Question 19 Multiple Choice (Single Answer)

We’ve just been handed an ad-hoc request for information which will require us to run a bunch of queries against a summary of last year's sales figures. What is the best choice for this situation?

  1. Derived Table
  2. Volatile Table
  3. Global Temp Table
  4. All of the above
Question 20 Multiple Choice (Single Answer)

The boss says he doesn’t care if it’s extra work. He wants that information at the end of this week and if he likes it he’s going to want it every week. What is the best choice for this situation?

  1. Derived Table
  2. Volatile Table
  3. Global Temporary Table
  4. None of the above