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
amid [387]
4 years ago
11

Write a static method that takes an array of Strings and returns an integer. Determine the longest String contained within the a

rray. Return the number of characters in that String.
Computers and Technology
1 answer:
AveGali [126]4 years ago
6 0

Answer:

static int detlongeststring (string a[30])

{

    int i=0, k=0;

    int len1 = strlen(a[0];

    for( i=0;i<=30;i++)

     {

        len=strlen(a[i]);

         if (len1>=len)

          {

              continue();

          }

         else

          {

              k=i;

           }

      }

     cout<<"The longest string is:"<<a[i];

     cout<<" The string length is:"<<strlen(a[i]);

     return strlen(a[i]);

  }

We are passing array of strings as argument to function. Now we compare strlen of each string with all and find the longest string, and we store the index in K. Then we print this string that is the lengthiest, and which has index k definitely.

Explanation:

The answer is self explanatory.

You might be interested in
Why should you not remove a program by deleting its folder?
igomit [66]

Answer:

for the first six members in the series of alkenes plot the number of hydrogen atoms on they exist in use this number the graph to drive the formula of alkane that has 10 carbon atoms. i will give brain list

6 0
3 years ago
The process of adding a header to the data inherited from the layer above is called what option below
Tom [10]

Answer:

The correct answer to the following question will be "Encapsulation".

Explanation:

The wrapping of the data into a single unit or the method by which a header is applied to the data inherited from the above layer is termed as Encapsulation.

While relating to networking, encapsulation would be the method of storing and converting data through one protocol into another, so that the data can proceed over a network. A TCP/IP package contained under an ATM system, for example, is indeed a kind of encapsulation.

Therefore, Encapsulation is the right answer.

4 0
3 years ago
Within a major students can choose to study a specific area within major. For example a journalism student may study military jo
crimeas [40]

Answer:

Specialization

Hope this helps!

6 0
4 years ago
Which of the following lines of distribution best describes the diagram?
SashulF [63]
A) retail distribution.
5 0
3 years ago
Read 2 more answers
What is the last step to a URL search
Molodets [167]
U paste it the u press enter

4 0
4 years ago
Other questions:
  • The first step in the five-step process for problem solving is to ____. take action complete the task understand the task or nee
    10·2 answers
  • Write two statements to get input values into birthMonth and birthYear. Then write a statement to output the month, a slash, and
    5·1 answer
  • Explain each of the three important concepts behind the Federal Networking Council's definition of the term Internet. Explain ho
    8·1 answer
  • The ________ is responsible for the Internet's domain name system and the allocation of IP addresses.
    12·1 answer
  • Which search engine do you prefer? Why
    15·2 answers
  • Visual culture is an area of academic study that deals with the totality of images and visual objects produced in ____________,
    6·1 answer
  • System A has two processors. Program X takes 50 seconds to execute on one of the processors. Program Y takes 50 seconds to execu
    8·1 answer
  • The two parts of a packet are the certificate and the While storms could be a cause, power _________ are more likely to be cause
    11·1 answer
  • What is the easiest way of ensuring that others can access a presentation that a user has created and make changes to it, while
    6·1 answer
  • PLEASE HELP!!! Me turn this into a video &amp; add liana flores- raise the moon (instrumental) in the background for the music.
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!