alcott1110
31.12.2019 •
Computers and Technology
Suppose you have the following declaration.
char[] namelist = new char[100];
which of the following range is valid for the index of the array namelist.
(i) 1 through 100
(ii) 0 through 100
1. both are invalid
2. only (i)
3. none of these
4. only (ii)
Solved
Show answers
More tips
- F Food and Cooking How to Determine Healthy, Nutritious Food for Yourself?...
- S Style and Beauty How to Get Rid of a Bruise: Tips and Tricks...
- F Food and Cooking Лечо: вкусное и простое блюдо для любой кухни...
- H Health and Medicine Relieving Swelling in Legs: Causes and Ways to Alleviate the Symptom...
Answers on questions: Computers and Technology
- C Computers and Technology Which devices are used in networking...
- C Computers and Technology Support team has asked the Administrator to create a guided process that allows the rep to use scripted screens to collect the appropriate information. Which tool should...
- C Computers and Technology Distinguish multiple inheritance and selective inheritance in oo concepts....
- C Computers and Technology These are keywords used with mysql_query/ mysqli_queryto update records in a table. select one: a. alter, change, column b. update, set, where c. alter, add, column d....
- C Computers and Technology How to use the include function? select one: a. include function( int.php ) b. include( int.php ) c. function include( int.php ) d. inc( int.php )...
- C Computers and Technology Which one of these variables has an illegal name? select one: a. $my_vars b. $my_var c. $my-var d. $myvar...
- C Computers and Technology Which of the following that can be use to access session variables in php? select one: a. $_session b. start_session() c. session_start() d. $_sessions...
- C Computers and Technology What will be the color if today is saturday? select one: a. arsort() b. rsort() c. sort() d. asort()...
- C Computers and Technology Write a class encapsulating the concept of a course grade, assuming a course grade has the following attributes: a course name and a letter grade. include a constructor,...
- C Computers and Technology Describe whether each conceptual, logical and physical database model level is hardware, software, and software type dependent/independent and why?...
Ответ:
Option 1 is the correct answer.
Explanation:
If a user declares an array of "100" size then it will count the index value from (0 to 99) because an array property says that when there is an array of "N" size then the array index value starts from 0 and ends on (N-1).
Statement (i) says that the index value is 1 to 100 when the array size is 100. but it is a wrong statement because it neglects the property of an array.Statement (ii) says that the index value is 0 to 100 when the array size is 100. but it is a wrong statement because it neglects the property of array and the index value is (0 to 100) is right when the size of an array is 101.Option 1 says that both are the incorrect statement. Hence it is the correct choice answer for the above question. while the other is not because --
Option 2 says that Statement (i) is right but it is wrong because it neglects the property of an array. Option 3 says that none of the options are correct but option 1 is the correct answer. Option 4 says that Statement (ii) is right but it is wrong because it neglects the property of an array.Ответ:
I guess its C, not sure though