PROGRAMMING WITH VBA - Practice Mode

1) What will be the output of the following VBA code?
Sub test()
a = 'Computer operator'
Debug.Print left(a,10)
End sub
Correct Answer: Computer o
2) What will be the output of the following VBA code?
Sub test()
Dim l as integer
Dim S as string
S = 'Time is money'
l = len(s)
Debug.print 'The length is' & l
End sub
Correct Answer: The length is 13
3) What will be the output of the following VBA function?
Sub stg()Str = 'Mathematics'
Debug.Print right(str,6)
End sub
Correct Answer: matics