1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
FrozenT [24]
3 years ago
15

Given a one dimensional array arr, what is the correct way ofgetting the number of elements in arr

Computers and Technology
1 answer:
SVETLANKA909090 [29]3 years ago
3 0

Answer:

The answer is option 1 arr.length.

Explanation:

In java arr.length gives the correct number of elements in the array.The length is function is only applicable for arrays.

The length() method is applicable for strings.

arr.length-1 will give 1 element less.

There is no .size for arrays in java.

So we conclude that arr.length is correct way of getting the number of elements in one dimensional array arr.

You might be interested in
A copy of the copyrighted work must be exactly the same as the original to infringe a copyright.
nordsb [41]

Answer:

true

Explanation:

7 0
3 years ago
For a sample of 100 students, the median number of text messages sent per day is 90, the first quartile is 78, and the third qua
crimeas [40]
Less than 78, more than 102,
4 0
3 years ago
50-75 words about what motivates you in academic life and are these motivators different from what motivates you in your persona
drek231 [11]

<u>Answer:</u>

<em>My teachers & My parents are the main reason to get through academics well. </em>

Though the reason might be common to most of the people, <em>the situation might be unique and the way the advice's are comprehended and the process of intake and the actions would be unique to each person.</em>

How a mother gives medicine to a child along with sugar, in a similar way my <em>parents and teachers gave me advice which made me to stand at this top-level.</em>

6 0
3 years ago
Which programming language is most susceptible to buffer overflow attacks?.
erastovalidia [21]

Answer: C and C++.

Explanation: ADIOS.

7 0
2 years ago
Write a function swaparrayends() that swaps the first and last elements of the function's array parameter. ex: sortarray
Katena32 [7]
Def swapArrayEnds( array ):
    tmp = array[ len( array ) - 1 ]
    array[ len( array ) - 1 ] = array[ 0 ]
    array[ 0 ] = tmp


3 0
2 years ago
Other questions:
  • Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in
    15·1 answer
  • You are logged in as a user with limited system privileges, you are the linux system administrator and you have the password to
    5·1 answer
  • What is the synonym for term port?
    9·1 answer
  • Which protocol is used by the client for microsoft networks and file and printer sharing for microsoft networks to communicate w
    10·1 answer
  • Which of these options would likely have a better playback experience in your presentation?
    8·2 answers
  • What should you do when you encounter an active directory domain controller for the domain could not be contacted?
    11·1 answer
  • a. Fill in the blanks with suitable words: A software that controls and manages all the activities of the computer ... b. A soft
    13·1 answer
  • ......... mi2hej<br><br>ejid8eo19o1b2bxhxjxjdnneejk2929nr
    5·2 answers
  • You have been given a laptop to use for work. You connect the laptop to your company network, use it from home, and use it while
    14·1 answer
  • Is majority intent determined by how many times the same type of result is shown on the search engine result page?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!