What will be the output of the following program when the button is clicked? Private Sub btnDisplay_Click(…) Handles btnDisplay.Click Dim word, result As String word = “Benjamin” result = Rotate(word) result = Rotate(result & word) result = Rotate(result) txtBox.Text = result End Sub Function Rotate(ByVal var As String) As String Dim varlength As Integer varlength = var.Length Return var.Substring(1) & var.Substring(0, 1) End Function

Question:
What will be the output of the following program when the button is clicked?
Private Sub btnDisplay_Click(…) Handles btnDisplay.Click
Dim word, result As String
word = “Benjamin”
result = Rotate(word)
result = Rotate(result & word)
result = Rotate(result)
txtBox.Text = result
End Sub
Function Rotate(ByVal var As String) As String
Dim varlength As Integer
varlength = var.Length
Return var.Substring(1) & var.Substring(0, 1)
End Function

1. jaminBBenjaminen

2.BenjaminBenjamin

3.njaminBe

4.None of the above.

Posted Date:-2022-02-11 09:43:52


More MCQS Questions and answers

Search
Olete Team
Online Exam Test Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on Online Exam Test website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!