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
Brrunno [24]
3 years ago
10

Remember that the function "main" takes optional parameters, these being common:

Computers and Technology
1 answer:
Dafna1 [17]3 years ago
6 0

Answer:

B

Explanation:

command line arguments are used when we want to pass some parameters to the main() function from outside the program . The first argument is an integer which gives the count of the parameters . next argument is a char array which contains name of the program and other command line arguments which we need to pass to the program. We can read those parameters from that character array. In the given statement int main(int ac,char *av[]) ac indicates argument count and av char array holds the actual arguments av[0] points to the name of program and from av[1] ,they points to the actual arguments that being  passed

You might be interested in
Create a program in c/c++ which accepts user input of a decimal number in the range of 1 -100. Each binary bit of this number wi
kirill115 [55]

Answer:

// here is code in C++.

#include <bits/stdc++.h>

using namespace std;

void switch_fun(int input)

{

//array to store binary of input number

   int bin[7];

   // convert the number into binary

   for(int i=0; input>0; i++)

       {

           bin[i]=input%2;

           input= input/2;

       }

   // print the switch number and their status

   cout<<"Switch number:\t 1\t 2\t 3\t 4\t 5\t 6\t 7 \n";

   cout<<"status:      ";

   for(int j=6;j>=0;j--)

   {

   // if bit is 1 print "ON" else print "OFF"

       if(bin[j]==1)

           cout<<"\t ON";

       else

           cout<<"\t OFF";

   }

}

int main()

{

   int n;

   cout<<"enter the number between 1-100 only:");

   // read a number in decimal

   cin>>n

   // validate the input

   while(n<1 ||n>100)

   {

     cout<<"wrong input!! Input must be in between 1-100:"<<endl;

     cout<<"enter the number again :";

     cin>>n;

   }

// call the function with input parameter

  switch_fun(n);

return 0;

}

Explanation:

Read a decimal number from user. If the number is not between 1 to 100 the it will again ask user to enter the number until the input is in between 1-100.Then it will call the fun() with parameter n. First it will convert the decimal to binary array of size 7.Then print the status of switch.If bit is 1 then print "ON" else it will print "OFF".

Output:

enter the number between 1-100 only:-5

wrong input!! Input must be in between 1-100:

enter the number again :125

wrong input!! Input must be in between 1-100:

enter the number again :45

Switch number:   1       2       3       4       5       6       7

Status:          OFF     ON      OFF     ON      ON      OFF     ON

8 0
3 years ago
What is online school like 3 sentences
lara [203]

Answer:

its okay. i mean like you have to do a bunch off stuff. andsomtimes it gets a little boring.

Explanation:

i am doing online school.

3 0
3 years ago
Read 2 more answers
As a compositional mode for electronic? media, __________ help people find their way through an unfamiliar system or? subject; t
maks197457 [2]
The answer that fills in the blank is orientation. It is because orientation does not provide all the details of what they are doing but a guideline of what they must do, in order for them to be guided on the things that they need to learn as they start. They require proper guidance which is the orientation before performing before hand. Especially when they are not familiar on what they need to do.
3 0
2 years ago
Brainless is one the way if you help
V125BC [204]

Answer:

1. x - 6

2. p - ? = 7

i chose these equations because

a number - 6 = the weight of your backpack.

p - an unknown number without a substitute variable = slices of bread left.

3 0
2 years ago
Which number is the smallest? 4.4 ⋅ 10^-5, 3.99 ⋅ 10^-6, 2.6 ⋅ 10^3
tiny-mole [99]
3.99 • 10^3 is the smallest
8 0
2 years ago
Other questions:
  • Please help me please and thank you!
    14·1 answer
  • What component has the job of managing data as it flows into and out of the places it needs to go?
    11·2 answers
  • There is no reason to study the works of famous photographers because they will make you less creative.
    5·2 answers
  • Keyboards that are widely used on various smartphones and other small portable devices, and which are designed primarily for com
    15·1 answer
  • If a client is found _________ the NAP will attempt to make it _______. Group of answer choices A. non-compliant, compliant B. s
    13·2 answers
  • What are the possible consequences of intentional virus setting?
    14·1 answer
  • Word templates include pre-made flyers which may be edited and saved only if permission is obtained from the Microsoft Office te
    11·1 answer
  • Develop a stored procedure that will take a state abbreviation as a parameter and list the name of the state, vendor, and total
    9·1 answer
  • QUESTION 1
    6·1 answer
  • Bob has started a company and registered its name with the government as a private corporation. He tries to create a domain name
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!