0

programming languages Online Quiz - 307

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

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


Correct Option: D

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


Correct Option: E

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


Correct Option: E

Who Led The C# Development Team?

  1. Safra A. Catz

  2. Charles Phillips

  3. Anders Hejlsberg

  4. Jeffrey O. Henley


Correct Option: C

Multiple Inheritance Is Supported In C#?

  1. True

  2. False


Correct Option: B

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.


Correct Option: A

Documentation System Of C# Is Similar To ?

  1. Javadoc

  2. J#

  3. C++

  4. Cdoc


Correct Option: A

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


Correct Option: B

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


Correct Option: C

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

  1. True

  2. False


Correct Option: A

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


Correct Option: A
  1. Access. Consistency. Isolation. Data.

  2. Access. Constraint. Index. Data.

  3. Atomicity. Consistency. Isolation. Durability.

  4. None of the above


Correct Option: C

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


Correct Option: B

The COALESCE function always produces integer results.

  1. True

  2. False


Correct Option: B

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

  1. Microsoft

  2. HP

  3. Intel

  4. Borland


Correct Option: A,B,C

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

  1. True

  2. False


Correct Option: B

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


Correct Option: A

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


Correct Option: B

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


Correct Option: C
- Hide questions