### programming languages Online Quiz - 348

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

Which clause should you use to exclude group results?

1. WHERE

2. HAVING

3. RESTRICT

4. GROUP BY

5. ORDER BY

Correct Option: B
Explanation:

To answer this question, the user needs to understand the purpose of each of the SQL clauses listed and how they are used in a query.

• WHERE: This clause is used to filter rows of data based on a specified condition or set of conditions. It is used to limit which rows are selected from a table.

• HAVING: This clause is used to filter the results of an aggregate function applied to a group of rows. It is used to limit which groups are displayed based on a specified condition or set of conditions.

• RESTRICT: There is no such SQL clause as RESTRICT.

• GROUP BY: This clause is used to group rows of data based on one or more columns. It is used in conjunction with aggregate functions to calculate results for each group of data.

• ORDER BY: This clause is used to sort the results of a query by one or more columns in ascending or descending order.

Based on the above information, the correct answer to the question is:

The HAVING clause is used to filter the results of an aggregate function applied to a group of rows. It is used to limit which groups are displayed based on a specified condition or set of conditions. Therefore, it can be used to exclude group results that don't meet the specified condition(s).

1. MAX

2. MIN

3. SUM

4. COUNT

5. TOTAL

6. LARGEST

Correct Option: C
Explanation:

To calculate the total of all salaries in the accounting department, you need to use the SUM function.

Option A (MAX) returns the highest value in a set of values.

Option B (MIN) returns the lowest value in a set of values.

Option C (SUM) is the correct option. It returns the sum of all values in a set of values.

Option D (COUNT) returns the number of values in a set of values.

Option E (TOTAL) is not a valid function in SQL.

Option F (LARGEST) is not a valid function in SQL.

Therefore, the answer is: C. SUM.

1. TRUNC

2. REPLACE

3. TO_DATE

4. MOD

5. CASE

Correct Option: B

Which constraint can be defines only at the column level?

1. UNIQUE

2. NOT NULL

3. CHECK

4. PRIMARY KEY

5. FOREIGN KEY

Correct Option: B

Which is an /SQL*Plus command?

1. INSERT

2. UPDATE

3. SELECT

4. DESCRIBE

5. DELETE

Correct Option: D
1. Is sizeof a keyword?
1. True

2. False

Correct Option: B
1. True

2. False

Correct Option: B
1. True

2. False

Correct Option: B
1. 1

2. 2

3. Many

4. None of these

Correct Option: C
1. Is a class a subclass of itself?
1. True

2. False

Correct Option: B
1. Are true and false keywords?
1. True

2. False

Correct Option: B

#### AI Explanation

To answer this question, we need to understand the concept of keywords in programming languages.

Option A) True - This option is incorrect because "True" is not a keyword in most programming languages. While some programming languages may have a keyword called "True" to represent a boolean value of true, it is not universally recognized as a keyword.

Option B) False - This option is correct because "False" is not a keyword in programming languages. In most programming languages, the keywords for representing boolean values are typically "true" and "false" (in lowercase).

The correct answer is B) False.

1. Does garbage collection guarantee that a program will not run out of memory?
1. True

2. False

Correct Option: B
1. Is null a keyword?
1. True

2. False

Correct Option: B
1. Which non-Unicode letter characters may be used as the first character of an identifier?
1. #

2. \$

3. _

4. @

Correct Option: B,C

How do you enable Strict Type Checking in VB.NET

1. With OPTION STRICT ON keyword

2. With OPTION EXPICIT Keyword

3. With OPTION STRICT OFF keyword

4. All the above

Correct Option: A
Explanation:

To enable Strict Type Checking in VB.NET, you need to use the "Option Strict On" keyword. This will enforce data type checking for all variables, parameters, and return types in your code.

Option Explicit, on the other hand, enforces explicit declaration of all variables in your code.

Option Strict Off disables strict type checking and allows automatic type conversions, making it easier to write code but potentially less safe.

The Answer is: A. With OPTION STRICT ON keyword

How do you add Web Methods in VB.Net

1. Add keyword to Method signature

2. Add [WebMethod] on top of the Method Signature

3. Add {WebMethod} on top of the Method Signature

4. None of the Above

Correct Option: A

#### AI Explanation

To add web methods in VB.Net, you need to add the [WebMethod] attribute on top of the method signature. This attribute is used to indicate that the method can be invoked from a web service.

Let's go through each option to understand why it is correct or incorrect:

Option A) Add keyword to Method signature - This option is incorrect because there is no specific keyword to add to the method signature to indicate a web method in VB.Net.

Option B) Add [WebMethod] on top of the Method Signature - This option is correct because adding the [WebMethod] attribute on top of the method signature is the correct way to indicate that the method is a web method in VB.Net.

Option C) Add {WebMethod} on top of the Method Signature - This option is incorrect because the correct syntax for adding attributes in VB.Net is to use square brackets ([ ]), not curly brackets ({ }).

Option D) None of the Above - This option is incorrect because option B, which suggests adding [WebMethod] on top of the method signature, is the correct way to add web methods in VB.Net.

Therefore, the correct answer is B) Add [WebMethod] on top of the Method Signature.

How do you create a Read only Property in VB.NET

1. Using Only Get..EndGet with in property definition

2. Using Only Set..EndSet with in property definition

3. Using both Get and Set

4. None of these

Correct Option: A

#### AI Explanation

To create a read-only property in VB.NET, you can use the "Only Get..End Get" syntax within the property definition.

Option A) Using Only Get..End Get within the property definition - This option is correct. By using the "Only Get..End Get" syntax, you can define a property with a getter method only, making it read-only. This means that the property can be accessed and retrieved but cannot be modified or set.

Option B) Using Only Set..End Set within the property definition - This option is incorrect. The "Only Set..End Set" syntax is not valid in VB.NET and cannot be used to create a read-only property.

Option C) Using both Get and Set - This option is incorrect. If a property has both a getter and a setter method, it is a read-write property, not a read-only property.

Option D) None of these - This option is incorrect. The correct option is A, which explains how to create a read-only property in VB.NET.

The correct answer is A) Using Only Get..End Get within the property definition. This option is correct because it demonstrates the correct syntax to create a read-only property in VB.NET.

How do you terminate code execute with in a VB.NET method

1. Exit

2. Close Sub

3. Exit Sub

4. Kill

Correct Option: C
1. Exit

2. Close Sub

3. Exit Sub

4. Kill

Correct Option: C
- Hide questions