nerdexam
GIAC

GSSP-NET · Question #171

GSSP-NET Question #171: Real Exam Question with Answer & Explanation

Sign in or unlock GSSP-NET to reveal the answer and full explanation for question #171. The question stem and answer options stay visible for context.

Question

Roger works as a Software Developer for BlackWell Inc. He develops an application, named MyApplication1, using Visual Studio .NET. The application contains a form, named MyForm1, which will be used to set a password for a user. A password allotted to a user will be case- sensitive. MyForm1 contains several controls including two TextBox controls, named txtPassword and txtConfirm, respectively. The txtMyPassword control is used to accept a string from a user. The string entered in txtPasword will be used as the password for the user. In txtConfirm, the user has to retype the string that he enters in txtPassword. This will ensure that there are no typing errors. MyForm1 also contains a Button control, named cmdSetPassword, which when clicked will set the password for the user. Before setting the password for a user, Roger wants to ensure that the two text boxes contain the same string. In order to accomplish this, he decides to use the StrComp function. The password for a user can only be set if the StrComp function returns 0. He has not used an Option Compare statement in the code. Which of the following statements can Roger use to compare the two strings? Each correct answer represents a complete solution. Choose two.

Options

  • AStrComp(txtPassword.Text, txtConfirm.Text, CompareMethod.Binary)
  • BStrComp(txtPassword.Text, txtConfirm.Text, CompareMethod.Text)
  • CStrComp(txtPassword.Text, txtConfirm.Text, CompareMethod.CaseSensitive)
  • DStrComp(txtPassword.Text, txtConfirm.Text)

Unlock GSSP-NET to see the answer

You've previewed enough free GSSP-NET questions. Unlock GSSP-NET for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full GSSP-NET Practice