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
natta225 [31]
4 years ago
11

Which of the following commands would you use to start the program Main with four strings? a. java Main arg0 arg1 arg2 arg3 b. j

ava Main argo arg1 arg 2 arg3 arg4c. java Main argo arg1d. java Main argo arg1 arg 2
Computers and Technology
1 answer:
kirill [66]4 years ago
5 0

Answer:

The answer is a. java Main arg0 arg1 arg2 arg3

Explanation:

The strings here are called command line argument. These command line arguments allow you to run your program from your terminal/command line. You may think just like passing parameters to a function. Since you have four strings in your program, you need to pass four arguments.

You might be interested in
The term BIOS stands for
iren2701 [21]
Basic Input-Output System
8 0
3 years ago
What form of contacts can be shared in Outlook 2016?
ArbitrLikvidat [17]

Answer:

shared contacts

Explanation:

5 0
3 years ago
Read 2 more answers
Write a program that prints the day number of the year, given the date in the form month-day-year. For example, if the input is
vlabodo [156]

Answer:

C++:

C++ Code:

#include <iostream>

#include <string>

using namespace std;

struct date

{

  int d,m,y;

};

int isLeap(int y)

{

  if(y%100==0)

  {

      if(y%400==0)

      return 1;

      return 0;

  }

  if(y%4==0)

  return 1;

  return 0;

}

int day_no(date D)

{

  int m = D.m;

  int y = D.y;

  int d = D.d;

  int i;

  int mn[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};

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

  {

      d += mn[i];

  }

  if(isLeap(y))

  {

      if(m>2)

      d++;

  }

  return d;

}

date get_info(string s)

{

  date D;

  int i,p1,p2,l = s.length();

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

  {

      if(s[i] == '-')

      {

      p1 = i;

      break ;

      }

  }

  for(i=p1+1;i<l;i++)

  {

      if(s[i] == '-')

      {

      p2 = i;

      break ;

      }

  }

 

  D.m = 0;

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

  D.m = (D.m)*10 + (s[i]-'0');

 

  D.d = 0;

  for(i=p1+1;i<p2;i++)

  D.d = (D.d)*10 + (s[i]-'0');

 

  D.y = 0;

  for(i=p2+1;i<l;i++)

  D.y = (D.y)*10 + (s[i]-'0');

 

  return D;

 

}

int main()

{

  string s1 = "4-5-2008";

  string s2 = "12-30-1995";

  string s3 = "6-21-2000";

  string s4 = "1-31-1500";

  string s5 = "7-19-1983";

  string s6 = "2-29-1976";

 

  cout<<"Date\t\tDay no\n\n";

  cout<<s1<<"\t"<<day_no(get_info(s1))<<endl;

  cout<<s2<<"\t"<<day_no(get_info(s2))<<endl;

  cout<<s3<<"\t"<<day_no(get_info(s3))<<endl;

  cout<<s4<<"\t"<<day_no(get_info(s4))<<endl;

  cout<<s5<<"\t"<<day_no(get_info(s5))<<endl;

  cout<<s6<<"\t"<<day_no(get_info(s6))<<endl;

 

 

  return 0;

}

Explanation:

4 0
3 years ago
All who are interested in forex trading and bitcoin mining follow me for account management to all who are busy with work so i c
masya89 [10]

I am very interested but too young just 10

8 0
3 years ago
A terrestrial biome is named according to the _____ in which a group of plants and animals occur together.
ikadub [295]

Answer:

Predominate Vegetation

Explanation:

3 0
4 years ago
Other questions:
  • Create a string called alphabet containing 'abcdefghijklmnopqrstuvwxyz', then perform the following separate slice operations to
    14·1 answer
  • This toolbar can be used to change the way the text in your presentation looks. Drawing
    5·2 answers
  • ? Assessment
    10·1 answer
  • Give a logical expression with variables p,q, and r that is true if p and q are false and r is true and is otherwise false.
    5·1 answer
  • Infrared, a wireless connection used in the past prior to bluetooth, was limited because it ________.
    10·1 answer
  • Will a pair of bar magnet ,with keepers on the two ends, act as a magnet
    13·1 answer
  • Write a program that assigns two integer values from standard input to the variables int1 and int2, then prints "True" if they a
    10·1 answer
  • Select the two statements below that are true. Press on the info button for
    13·1 answer
  • Which of the following gives the
    12·2 answers
  • Is brainly bugging out rn? <br> The site isnt like loading completely
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!