0

programming languages Online Quiz - 87

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

What is used to validate complex string patterns like an e-mail address ?

  1. Extended expressions

  2. Regular expressions

  3. Irregular expressions

  4. Basic expressions


Correct Option: B

Some bits of a Visual Basic 6 application, like most APIs, can be easily migrated to VB.NET; other parts are not so straightforward. Which of the following will NOT have to be re-architected during a VB 6-to-VB.NET migration ?

  1. DHTML pages

  2. ADO to ADO via Interop

  3. ActiveX documents

  4. OLE controls


Correct Option: B

which program will you use to assemble a program written in IL:

  1. ildasm

  2. clr

  3. ilasm

  4. All the above


Correct Option: C

What’s the difference between a class field property ?

  1. A field always has Get and Set Methods

  2. A property always has Get and Set Methods

  3. Both 1 and 2

  4. None of the above


Correct Option: D

Can you create Windows Services using VB.Net

  1. Yes

  2. No

  3. Not always

  4. None of these


Correct Option: A

Can a toolbar display text instead of pictures in the buttons ?

  1. No, a toolbar can only display images

  2. No, a toolbar can only display text

  3. Yes, a toolbar can display text, images, or both.

  4. None of these


Correct Option: C

The vbc.exe compiler generates:

  1. IL Code

  2. Native code

  3. Byte Code

  4. None of these


Correct Option: A

Select the keyword used to refer the name space in our code in VB.Net

  1. Using

  2. Package

  3. Imports

  4. None of the above


Correct Option: 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
  1. By setting the object to Null

  2. With Close keyword

  3. By setting the object to Nothing

  4. None of the above


Correct Option: C

What two controls are needed when creating a toolbar ?

  1. Only Toolbar control

  2. ImageList and Toolbar control

  3. Both 1 and 2

  4. All the above


Correct Option: B
Explanation:

To create a toolbar, two controls are needed: an ImageList control and a Toolbar control.

Option A is incorrect because only a Toolbar control is not sufficient to create a toolbar.

Option B is correct because it accurately identifies the two controls needed to create a toolbar. An ImageList control is used to store the images that will be displayed on the toolbar buttons. A Toolbar control is used to create the actual toolbar, and it references the images in the ImageList control for the button icons.

Option C is incorrect because it is not a valid option.

Option D is incorrect because it includes option A which is incorrect.

Therefore, the correct answer is: B. ImageList and Toolbar control.

With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" starts with an "a"?

  1. SELECT * FROM Persons WHERE FirstName='%a%'

  2. SELECT * FROmPersons WHERE FirstName LIKE '%a'

  3. SELECT * FROM Persons WHERE FirstName='a'

  4. SELECT * FROM Persons WHERE FirstName LIKE 'a%'


Correct Option: D

The OR operator displays a record if ANY conditions listed are true. The AND operator displays a record if ALL of the conditions listed are true

  1. True

  2. False


Correct Option: B

AI Explanation

To answer this question, you need to understand the basic functionality of the OR and AND operators in programming or database queries.

The OR operator returns true if at least one of the conditions listed is true. It evaluates the conditions in order and stops as soon as it finds the first true condition. If none of the conditions are true, the OR operator returns false.

On the other hand, the AND operator returns true only if all of the conditions listed are true. It evaluates the conditions in order and stops as soon as it finds the first false condition. If any of the conditions are false, the AND operator returns false.

Based on this explanation, we can determine that the statement "The OR operator displays a record if ANY conditions listed are true. The AND operator displays a record if ALL of the conditions listed are true" is incorrect.

The correct answer is B) False.

Which SQL statement is used to return only different values?

  1. SELECT UNIQUE

  2. SELECT DIFFERENT

  3. SELECT DISTINCT

  4. None of the above


Correct Option: C

AI Explanation

To answer this question, you need to understand the purpose of the SQL statement used to return only different values.

Option A) SELECT UNIQUE - This option is incorrect because there is no "UNIQUE" keyword in SQL for selecting only different values. The "UNIQUE" keyword is used in the table definition to enforce uniqueness on a column or set of columns.

Option B) SELECT DIFFERENT - This option is incorrect because there is no "DIFFERENT" keyword in SQL for selecting only different values.

Option C) SELECT DISTINCT - This option is correct because the "DISTINCT" keyword is used in SQL to return only different values. It eliminates duplicate values from the result set, returning only unique values.

Option D) None of the above - This option is incorrect because option C, "SELECT DISTINCT," is the correct SQL statement for returning only different values.

The correct answer is C) SELECT DISTINCT. This option is correct because the "DISTINCT" keyword is used in SQL to return only different values by eliminating duplicates from the result set.

With SQL, how can you return the number of records in the "Persons" table?

  1. SELECT COUNT() FROM Persons

  2. SELECT COLUMNS() FROM Persons

  3. SELECT COLUMNS(*) FROM Persons

  4. SELECT COUNT(*) FROM Persons


Correct Option: D

How many clustered indexes can be created on single table

  1. 1

  2. 128

  3. Up to number of columns in table

  4. 256


Correct Option: A

Which is not the type of join in SQL SERVER

  1. Inner

  2. Left

  3. Cross

  4. Multiple

  5. Right


Correct Option: D

Which of the following is not valid constraint in SQL SERVER

  1. Default

  2. Check

  3. Distinct

  4. Unique


Correct Option: C

Which SQL keyword is used to sort the result-set?

  1. ORDER BY

  2. ORDER

  3. SORT

  4. Distinct


Correct Option: A

Which of following is not an aggregate function in SQL SERVER

  1. MIN

  2. MAX

  3. AVG

  4. COUNT

  5. SUM

  6. GROUP


Correct Option: F
- Hide questions