Std 12 Computer Textbook Solution CH-09 Working with Array and String
Textbook MCQ with Solution CH-09 Working with Array and String
1. Which of the following refer to the starting index value in arrays?
a. 0
b. 1
c. Null
d. All of these
2. What is the size of second dimension in an array sales [5] [12]?
a. 5
b. 12
c. 60
d. 10
3. What will expression sales.length return for an array sales [5] [12]?
a. 5
b. 12
c. 60
d. 120
4. When an array sales [5] [12] is declared without specifying initial values, what is the initial value of sale [0] [0] ?
a. 0
b. default value
c. compilation error
d. 60
5. What does ‘length’ refer to for an object of String class?
a. attribute
b. method
c. class variable
d. class name
6. If ‘str’ is the object of String class and its content is “Thank GOD”, then what is the value of str.length()?
a. 9
b. 10
c. 8
d. 11
7. What type of value is returned when we use get method of Calendar class with constant DAY_OF_WEEK as an argument?
a. int
b. char
c. string
d. boolean
0 comments: