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
What are the disadvantages of using grid analysis to help make decisions?
alekssr [168]

Answer:

Grid analysis is best used when a decision needs to consider multiple outcomes and different criteria. The format of this method however, can provide bias to a certain outcome. The process is only as good as the quality of information placed within the grid including the scoring. Once a factor is graded or placed subjectively, objectivity is compromised in this method. Also, this method keeps decision making strictly in a rational manner. But, it is considered unhealthy to be linear in decision making and one-sided. It is best to base decisions from a rational and take emotions into account as well.

7 0
3 years ago
Read 2 more answers
How do programmers recognise patterns, generalise and abstract information
Dima020 [189]

Answer:

Pattern recognition is the process of recognizing patterns by using machine learning algorithm. ... In a typical pattern recognition application, the raw data is processed and converted into a form that is amenable for a machine to use. Pattern recognition involves classification and cluster of patterns

Explanation:

4 0
3 years ago
Wanda manages an application that fluctuates in usage quite a bit. Sometimes it uses quite a few servers with lots of memory and
TEA [102]

Answer:

c. Elasticity

Explanation:

When referring to Cloud Servers this capability is known as Elasticity. It basically describes how able and efficient a server is to automatically implement resources and remove resources in order meet the specific amount of demand at any given moment. Many times a server will not have much demand but will still have all the resources being used by the server. Being able to remove these unused resources so that they are available for other usage is what makes the servers elastic.

8 0
3 years ago
Write the definition of a method dashedLine, with one parameter, an int. If the parameter is negative or zero, the method does n
ZanzabumX [31]

Answer:

import java.util.Scanner;

public class DashLine {

public static void main(String[] args) {

// Declaring variables

int n;

/*

* Creating an Scanner class object which is used to get the inputs

* entered by the user

*/

Scanner sc = new Scanner(System.in);

// Getting the input entered by the user

System.out.print("Enter a number :");

n = sc.nextInt();

// calling the method by passing the user entered input as argument

dashedLine(n);

}

//This method will print the dashed line for number greater than zer

private static void dashedLine(int n) {

if (n > 0) {

for (int i = 1; i <= n; i++) {

System.out.print("-");

}

System.out.println();

}

}

}

Explanation:

5 0
3 years ago
The material to be broadcast and the way it's arranged is called __________. (10 letters)
ladessa [460]

Answer:

journalism

Explanation:

7 0
3 years ago
Other questions:
  • Write a program which can do a String Check if its Panagram or not!
    10·1 answer
  • A _____ is a predefined text format that includes multiple formatting options.
    14·1 answer
  • After a new technology is purchased,what are some additional costs that must be incorporated into an upgrade budget?
    6·1 answer
  • "where is a cookie that is created during a web site visit​ stored?"
    9·1 answer
  • When do images or graphics in Microsoft Word hurt the document rather than help
    9·1 answer
  • --------------------is a host that runs software to provide information, such as web content, to other hosts.
    9·1 answer
  • Which of the following topics should you avoid bringing up during a college interview?
    10·2 answers
  • Which statement best describes the purpose of the Insert Function dialog box?
    13·1 answer
  • What is episodic memory? knowledge about words, concepts, and language-based knowledge and facts information about events we hav
    10·1 answer
  • Which type of system is used to analyze, evaluate, and integrate the output of other systems?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!