Filters
Question type

Study Flashcards

The strSerialNum variable contains the string "DRY259614". Write the Visual Basic statement that assigns the string "259614" from the strSerialNum variable to the strProductCode variable.

Correct Answer

verifed

verified

strProductCode = str...

View Answer

The method that removes characters from only the right end of a string is the ____ method.


A) Trim
B) TrimRight
C) TrimEnd
D) TrimR

E) A) and D)
F) B) and D)

Correct Answer

verifed

verified

The strPassword variable contains eight characters. Two of the characters in the password must be numeric. Which of the following statements will access each character stored in the variable, character by character?


A) If strPassword Like "[A-Z][A-Z][A-Z][A-Z][A-Z][A-Z]##"
B) For intIndex As Integer = 0 To 7
C) For intIndex As Integer = 1 To 8
D) For intIndex As Integer = 1 To strPassword.Length - 1

E) A) and C)
F) A) and B)

Correct Answer

verifed

verified

Describe four of the six menu standards that should be followed when including a menu in an application.

Correct Answer

verifed

verified

1. Menu title captions should be one wor...

View Answer

The ____ operator evaluates to True when the string matches the pattern; otherwise, it evaluates to False.


A) Like
B) Menu
C) Add
D) Insert

E) C) and D)
F) B) and D)

Correct Answer

verifed

verified

The most commonly used properties for a menu element are the Name and Text properties.

A) True
B) False

Correct Answer

verifed

verified

The strPhone variable should contain only numbers and no dashes (-) . An error message should display if there is a dash anywhere in the variable. Which of the following statements determines whether the variable contains a dash in order to display the message?


A) If strPhone.Contains("-") = True Then
B) If strPhone.Contains("-") = False Then
C) If strPhone Like "-" Then
D) If strPhone.Contains(#######) = False Then

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

You can use the ____ method to search a string to determine whether it contains a specific sequence of characters.


A) Contains
B) Insert
C) Substring
D) IndexOf

E) All of the above
F) A) and C)

Correct Answer

verifed

verified

If a menu item requires additional information from the user, the Windows standard is to place a(n) ____ at the end of the caption.


A) underscore (_)
B) asterisk (*)
C) pound key (#)
D) ellipsis (…)

E) All of the above
F) A) and B)

Correct Answer

verifed

verified

The ____ method performs a case-sensitive search that returns the Boolean value True when the subString is contained anywhere in the string.


A) Insert
B) IndexOf
C) Contains
D) Substring

E) A) and B)
F) None of the above

Correct Answer

verifed

verified

You can use a string's Value property to determine the number of characters it stores.

A) True
B) False

Correct Answer

verifed

verified

Write the Visual Basic statement to assign the number of characters in the txtSSN control's Text property to the intSSNNumChar variable.

Correct Answer

verifed

verified

intSSNNumC...

View Answer

A literal type character forces a literal constant to assume a data type other than the one its form indicates.

A) True
B) False

Correct Answer

verifed

verified

The ____ method pads the string on the right, which inserts the padded characters at the end of the string and left-aligns the characters within the string.


A) PadEnd
B) PadRight
C) Padding
D) PadAll

E) B) and C)
F) B) and D)

Correct Answer

verifed

verified

In Visual Basic 2015, you use a(n) ____ to include one or more menus in an application.


A) Like operator
B) Contains method
C) Insert operator
D) MenuStrip control

E) B) and C)
F) A) and C)

Correct Answer

verifed

verified

Write a Visual Basic statement that removes the last four digits of the credit card number and assigns it to the strCCLastFour variable. strCCNum = "4456778996352852"

Correct Answer

verifed

verified

strCCLastF...

View Answer

Write the condition that evaluates to True when the string stored in the strCode variable begins with "HFS", followed by two uppercase letters, followed by five numbers.

Correct Answer

verifed

verified

If strCode...

View Answer

Write the Visual Basic statements needed to format decNetPay with two decimal places, pad the formatted variable with asterisks until its length is 12, and then insert a dollar sign ($) as the first character. The result is assigned to the strNetPayFormat variable.

Correct Answer

verifed

verified

strNetPayFormat = decNetPay.To...

View Answer

Which of the following shortcut keys should not be used in Windows applications that have an EDIT menu for menu items not on the EDIT menu?


A) Ctrl+X
B) Ctrl+Q
C) Ctrl+V
D) both a and c

E) B) and C)
F) C) and D)

Correct Answer

verifed

verified

How many characters will be removed from the string below? Dim myString as string = "ABCDEFGH" MyString = myString.Remove(2, 3)


A) one
B) two
C) three
D) four

E) B) and D)
F) B) and C)

Correct Answer

verifed

verified

Showing 21 - 40 of 60

Related Exams

Show Answer