0

programming languages Online Quiz - 110

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

How we can include header and footer into our HTML page?

  1. Using SSI include

  2. Using JSP include

  3. Using Asp include

  4. All of the above


Correct Option: A

What will extension for SSI?

  1. .shtml

  2. .html

  3. .htm

  4. .jsp


Correct Option: A

Which sequence of HTML tags are correct?


Correct Option: B

We send and receive HTML file using which protocol?

  1. SMTP

  2. HTTP

  3. POP3

  4. FTP


Correct Option: B

UPDATE command is of following type

  1. Data Defenition Language

  2. Data Manipulation Language

  3. Data Updation Language

  4. Data Selection Language


Correct Option: B

DELETE command will delete the table from database

  1. True

  2. False


Correct Option: A

You want to select all employee names starting with capital C. Which clause you will use?

  1. order by

  2. Like

  3. sameas

  4. not like


Correct Option: B

Following SQL operator will allow duplicates

  1. UNION ALL

  2. UNION

  3. INTERSECT

  4. MINUS


Correct Option: A

Which keyword is used in the select query to remove duplicates?

  1. Only

  2. NoDuplicate

  3. All

  4. Distinct


Correct Option: D

Which two of the following orders are used in ORDER BY clauses?

  1. ABS

  2. ASC

  3. DESC

  4. DISC


Correct Option: B,C

The default character for specifying runtime variables in SELECT statements is

  1. Ampersand

  2. Ellipses

  3. Quotation marks

  4. Asterisk


Correct Option: A

AI Explanation

To answer this question, you need to understand the concept of runtime variables in SELECT statements.

The default character for specifying runtime variables in SELECT statements is the ampersand symbol (A).

Option A) Ampersand - This option is correct because the ampersand symbol is commonly used as the default character for specifying runtime variables in SELECT statements. This allows users to input values during query execution.

Option B) Ellipses - This option is incorrect because ellipses (...) are not used to specify runtime variables in SELECT statements.

Option C) Quotation marks - This option is incorrect because quotation marks are not used to specify runtime variables in SELECT statements.

Option D) Asterisk - This option is incorrect because the asterisk (*) is used in SELECT statements to select all columns, but it is not used to specify runtime variables.

The correct answer is A) Ampersand, as it is the default character for specifying runtime variables in SELECT statements.

Which of the following is not a group function?

  1. avg( )

  2. sqrt( )

  3. sum( )

  4. max( )


Correct Option: B
  1. Execute notify(thread1); from within synchronized code of mon.

  2. Execute mon.notify(thread1); from synchronized code of any object.

  3. Execute thread1.notify(); from synchronized code of any object.

  4. Execute thread1.notify(); from any code(synchronized or not) of any object.

  5. You cannot specify which thread will get notified.


Correct Option: E

What of the following fails to cause a thread stop executing ?

  1. The program exits via a call to System.exit(0);

  2. Another thread is given a higher priority.

  3. A call to the thread's stop method.

  4. A call to the halt method of the Thread class.


Correct Option: D
  1. Execute notify(thread1); from within synchronized code of mon.

  2. Execute mon.notify(thread1); from synchronized code of any object.

  3. Execute thread1.notify(); from synchronized code of any object.

  4. Execute thread1.notify(); from any code(synchronized or not) of any object.

  5. You cannot specify which thread will get notified.


Correct Option: E

What of the following fails to cause a thread stop executing ?

  1. The program exits via a call to System.exit(0);

  2. Another thread is given a higher priority.

  3. A call to the thread's stop method.

  4. A call to the halt method of the Thread class.


Correct Option: D

Program output : package com.collection.examples; import java.util.HashSet; public class HashSetExample { public static void main(String[] args) { HashSet s = new HashSet();//1 for(short i = 0; i<100;i++){ //2 s.add(i); //3 s.remove(i-1); //4 } System.out.println(s.size()); //5 } }

  1. NumberFormat Exception

  2. 100

  3. Compilation fails at line 4

  4. 99


Correct Option: B

Which of the following options is true for the following program: try { if (choice) { while (true) } else { system .exit(1): } }finally { codetocleanup(); }

  1. Runtime Exception

  2. finally block will be executed

  3. finally block will not be executed

  4. Compilation error in else block


Correct Option: C
- Hide questions