Multiple Choice
Case-Based Critical Thinking Questions Case 1 - Human Resources Application
An application used by the Human Resources (HR) department needs to be improved. You need to use various string manipulation properties and methods to ensure all data entered by a user is accurate and stored correctly.
Each employee is assigned an employee code, such as F01234, which is stored in the strEmpCode variable. The first character is a letter for employment status (F for Full-time, P for Part-time) . The next two characters are numbers representing the employee's department number. The last three characters are numbers representing a unique value for each individual employee. Which of the following statements assigns the employee's department to the strDept variable?
A) strDept = strEmpCode.Substring(0, 1)
B) strDept = strEmpCode.Substring(1)
C) strDept = strEmpCode.Substring(0, 2)
D) strDept = strEmpCode.Substring(1, 2)
Correct Answer:

Verified
Correct Answer:
Verified
Q11: The following instruction will remove which character
Q13: The _ method inserts the padded characters
Q16: To remove characters from the left of,the
Q19: Write a Visual Basic statement that will
Q21: The Trim method is used to remove
Q22: Each menu element is considered a(n)_ and
Q35: The _ allows you to use pattern-matching
Q44: Visual Basic provides the _ method for
Q56: Write the Visual Basic statement that inserts
Q58: You can use a string's Value property