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

Given an int variable k, an int array incompletes that has been declared and initialized, an int variable studentID that has bee

n initialized, and an int variable numberOfIncompletes, write code that counts the number of times the value of studentID appears in incompletes and assigns this value to numberOfIncompletes. You may use only k, incompletes, studentID, and numberOfIncompletes. SUBMIT
Computers and Technology
1 answer:
Feliz [49]3 years ago
7 0

Answer:

check the explanation

Explanation:

Variables when it comes to programming are used to store data to be documented and manipulated in a computer program. They can also be used for labeling stored data with a descriptive name and any other needed details, so that the programs can be comprehended more understandably by the reader and ourselves.

to solve the question, we will write this set of codes;

numberOfIncompletes = 0;

for(k = 0; k < incompletes.length; k++)

{

       if(incompletes[k] == studentID)

           numberOfIncompletes++;

}

You might be interested in
Hilda is troubleshooting a problem with the encryption of data. at which layer of the osi reference model is she working?
Fittoniya [83]
The la<span>yer of the osi reference model that hilda is currently working on is: presentation
On Osi reference model, the presentation layer is created </span><span>to take care of the semantics and syntax of the information exchanged between two systems. The presentation layer will make sure that the receiver of the information will understand the data that being given.</span>
7 0
3 years ago
Question #6
Vitek1552 [10]

Answer:

ValueError

Explanation:

Required

Determine the error the program returned

The above will return a ValueError error and the reason is as follows.

The first line of the program initializes variable as 'live'.

The next line tries to convert answer to integer and this is where it returns the error'.

On the second line, variable amount expects that the answer variable to contain number e.g. '567' but because it doesn't contain a complete number (i.e. unexpected values), the program returns a ValueError.

7 0
3 years ago
Read 2 more answers
Overloading in methods are popular in programming, and why overloading is important.
Cerrena [4.2K]

Answer:

 Yes, overloading is one of the methods which are popular in programming language. Overloading basically refers to the same function but different signature called function overloading or method overloading. It is the ability to define the multiples method by using the single identifier.

The overloading is important because it has the ability to design the multiple method by using similar name. It also provide the high flexibility to the programmers to call the same method in the data. overloading basically provide the high clarity in the code.

Overloading is used to achieved the compile time polymorphism.  

Following are program of function overloading in c++ are:

Class abc // creating class

{

public:

int p;

void fun() // function fun with no parameter/

{

cout<<” hello “;

}

void fun(int a) // function fun with parameter

{

p=a;

cout<<p;

}

};

int main() // main function

{

abc ob; // creating object

ob.fun();// print hello;

ob.fun(6);// print 6

return 0;

}

Explanation:

In this program the function fun() have same name but different signature in the main method we create the object of class abc i.e ob. ob.fun() this statement called the function with no parameter and ob.fun(6) this statement will called the function with integer parameter.

5 0
3 years ago
Mindy wants to create a new subdirectory at ~/2019projects/projectx/projectplans to start storing the initial project plans for
alexgriva [62]

Answer:

b. mkdir -p ~/2019projects/project/projectplans

Explanation:

mkdir command in Linux environment is used to create a new directory. This command is used to create a folder to store the information in organized manners.

-p is used to create a parent folder in the directory. If we want to start a new project or want to store information about some new topic we will create a new folder for that purpose. So, -p is used to create a new folder in directory.

In above mentioned case, this is the first project that Mindy started in 2019, so she should create a parent directory of 2019 to save all projects details that she worked in 2019. So she should use -p with mkdir command to make 2019 as a parent folder.

6 0
3 years ago
I just wanted to know what are some of the challenges that could arise from setting up a file management system on a computer
ArbitrLikvidat [17]
There is always a risk of you losing files and then you may have to pay for it depending on what services you use.

7 0
3 years ago
Read 2 more answers
Other questions:
  • You would set a ___________ to prevent users from immediately changing their password several times in one day to return to the
    15·2 answers
  • ( Game Design) The companies who get video games out to consumers are called:
    12·1 answer
  • A computer is a multipurpose device that accepts input, processes data, stores data, and produces output, all according to a ser
    9·1 answer
  • Problem 5. (Greatest Common Divisor) Write a program gcd.py that accepts p (int) and q (int) as command-line arguments, and writ
    13·1 answer
  • What is the foundational domain for business
    12·1 answer
  • Write the Number class that can be used to test if the number is odd, even, and perfect. A perfect number is any number that is
    10·1 answer
  • Anne wants to hide her age by converting it from 13 to 1101. Which number system is Anne converting to?
    13·1 answer
  • Describe accessibility in Windows 7 ​
    13·1 answer
  • Print("Weight on Earth?")
    13·1 answer
  • Which description best applies to a macro?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!