We have an array named my Array where this sentence is stored-02341
This subjective question is related to the book/course vu mth718 Topics in Numerical Methods. It can also be found in vu mth718 Mid Term Solved Past Paper No. 6.
Question 1: We have an array named my Array where this sentence is stored. "Welcome to Virtual University!"
If we apply str.split('') method.
What will be the output of str.split('')myArray(4) and str.split('')myArray(2) respectively.
str.split('') myArray(4) = blank
str.split('') myArray(2) = virtual
If we apply str.split('') method.
What will be the output of str.split('')myArray(4) and str.split('')myArray(2) respectively.
Answer:
str.split split the string based on the blank spaces.str.split('') myArray(4) = blank
str.split('') myArray(2) = virtual