Assuming int numbers[SIZE]; is initialized somehow, write a function counter() that you can send the array to, plus an extra integer, and the function will return the number of times that value is found in the array. For example, if the array of SIZE 7 contains {1,2,3,2,3,3,3}then the call
x=counter(numbers,SIZE,3); will put 4 into x.

Answers

Answer 1

Answer:

Explanation:

The following function is written in Java and takes in three parameters the array, its size, and the chosenNumber that will be counted. The function then creates an instance variable called Counter and loops through the given array looking for the chosenNumber. Every time that the number is found in the array it adds 1 to the counter. Once the loop is done it returns the total value of the counter variable.

 public static int counter(int[] numbers, int Size, int chosenNumber) {

       int counter = 0;

       for (int x = 0; x < Size; x++) {

           if(numbers[x] == chosenNumber) {

               counter++;

           }

       }

       return counter;

   }


Related Questions

list any three importance of computer​

Answers

Answer:

here is the answer

Explanation:

1) accurate

2) fast

3) can accomplish tasks more effencily

It is always better to get at least 3 times the amount of b-roll needed

True
False

Answers

Answer:

true

Explanation:

write passage on computer virus​

Answers

In more technical terms, a computer virus is a type of malicious code or program written to alter the way a computer operates and is designed to spread from one computer to another. A virus operates by inserting or attaching itself to a legitimate program or document that supports macros in order to execute its code.

Answer:

A computer virus is a relatively small program that attaches itself to data and program files before it delivers its malicious act. There are many distinct types of viruses and each one has a unique characteristic. Viruses are broken up into to main classes, file infectors and system or boot-record infectors.

hope it helps

What are stored procedures? What kind of attack do stored procedures protect from? Identify two reasons why stored procedures are a good mitigation against the specific attack. g

Answers

Answer:

Stored procedures or procedures are subroutines or subprograms in SQL written by the user to accomplish a certain task. it helps to mitigate SQL injection by using markers as placeholders for data input and it streams the query statement and data separately in the database.

Explanation:

The stored procedure used in SQL is a user-defined function. Unlike built-in functions like pi(), they must be called to use them.

SQL injection in query statements is written by hackers to bypass conditions, especially when trying to gain access to other user accounts. Stored procedures use markers or placeholders to prevent this.

Insert the missing code in the following code fragment. This fragment is intended to implement a method to set the value stored in an instance variable.
Public class Employee
{
Private String empID;
Private boolean hourly;
) . .
_______
{
Hourly = isHourly;
}
}
A) public void setHourly(String isHourly)
B) public void getHourly()
C) public boolean getHourly()
D) public boolean setHourly(boolean isHourly)

Answers

Answer:

A)

Explanation:

In this code example the missing piece of code would be...

public void setHourly(String isHourly)

This piece of code is creating a function called setHourly which takes in one String variable as it's parameter. Based on the rest of the code, the function takes that parameter variable and places it into an instance variable called Hourly which can be used when the function is called.

Many electronic devices use a(n) ?, which contains all the circuit parts in a miniature form.

Answers

Answer:

An integrated circuit is a single, miniature circuit with many electronically connected components etched onto a small piece of silicon or some other semiconductive material. (A semiconductor is a nonmetallic material that can conduct an electric current, but does so rather poorly.)

Explanation:

Many electronic devices use a(n) integrated circuit which contains all the circuit parts in a miniature form.

The use of  integrated circuit is known to be a kind of a single, miniature circuit that has a lot of electronically connected parts that are designed onto a small piece of silicon or semi conductive material.

A lot of electronic components are known to be capacitors, inductors, resistors, diodes, transistors and others.

Learn more about electronic devices from

https://brainly.com/question/11314884

Documenting findings, actions, and outcomes of network troubleshooting calls is an essential part of the troubleshooting process. List the reasons why documentation is critical, and discuss the form that this documentation could take (e.g. blogs, wikis, professional document management software, etc). Include a detailed description of what information would need to be saved.

Answers

Answer:

The main purpose of documentation is for future reference on the cost, materials, procedures, and techniques used in a task. It can be in form of a video log, report, digital text document or software, etc.  

Explanation:

Documentation is an important practice of taking notes of events during a process. It could in the process of creating or discovering new ideas or repair or management of existing processes. It holds the time, cost, technique, event name, measures-taken, etc, that would totally describe the event.

What is one feature that differentiates social media information systems (SMIS) from Web site applications? A user has to login to a Web site to use the special features. SMIS do not use browsers. A user can comment on a Web site. SMIS has more users than a Web site. SMIS has connection data

Answers

Answer:

A user has to login to a Web site to use the special features.

Explanation:

This is true because, even though website could be able to give the required information needed at that particular point in time, in order to use the special features found in the website, there is need to login into the website.

For example, Brainly which is a website needs the students to login in-order to ask his or her questions where not clarified with an expected answer gotten from the website.

Bluetooth uses this medium to connect two devices.
Select one:
a. microwave signals
b. fiber optics
c. infrared light
d. radio signals

Answers

Answer:

D

Explanation:

Bluetooth is the wireless technology which allows for the exchange of the data between different devices. It uses wavelength to transmit information and generally works with short rage devices.

Due to Bluetooth relies on the range of devices and hence it depends on the UHF radio waves. These have a range of 2.4 to 2.5 Ghz. Such that the devices can talk to each other. The usage is control automation system.

Hence the option D is correct.

Learn more about the uses this medium to connect two devices.

brainly.in/question/5681178.

Type the correct answer in the box. Spell all words correctly.

A freelance graphic designer has received an assignment to design a company logo. What image format is most suitable to display this logo on the company website?

The _________ format is most suitable in order to display the logo on the company website.

Answers

Answer:

The most suitable format for logo is PNG

Explanation:

PNG stands for portable network graphics. It is an improved version of gif. The best thing in png is that it is lossless compression and the background is not visible. Both 24 and 32 bit Colour can be used in png. PNG became ISO standard in sixteen years ago in 2004.

What are the advantages and disadvantages of using steganography versus symmetric or asymmetric encryption

Answers

Explanation:

Steganography is a technique used in securing or hiding sensitive information by encrypting the information in a non-hidden file like a JPEG format. A major advantage of this method is that it reduces the risk of attack or break-in since the data is enclosed in a non-secure file; thereby reducing threats of any hack. One main disadvantage of this method is that the hidden message may become difficult to recover if the source file (non-secure file) used, is edited or deleted.

In symmetric or asymmetric encryption they both employ cryptographic encryption method. While symmetric encryption uses one key to encrypt and decrypt data, asymmetric encryption uses two keys (one for encryption, the other for decryption) of the data. A major advantage of using these methods is that they provide more security. Although while symmetric encryption is faster, asymmetric encryption is slower (eg using separate keys to gain access), a disadvantage.

A strategy for concealing critical information as well as ensuring its secure communication everything in non-hidden storage is steganography.

Advantage:

Because the content is contained throughout a non-secure file, the above strategy decreases the chance of an assault on classified info.

Disadvantage:

This approach has the disadvantage that concealed information might be able to retrieve if somehow the documents have been changed or deleted as of a non-secure file.

Once again to encrypt as well as decode information, symmetric encryption employs a unique key, but asymmetric encryption utilizes two different keys, something for encryption as well as someone else for decryption.

Advantage:

One such approach is superior to steganography throughout the level of protection.

Disadvantage:

Because distinct keys have been needed to get access, such techniques of asymmetric encryption are considerably slower.

Thus the approach above is correct.

Learn more about steganography here:

https://brainly.com/question/15187715

While your hands are on home row, both of your thumbs are on _____.

Answers

Answer:

While your hands are on home row, both of your thumbs are on Space-barI know this will definitely help✍️✍️✍️

Professor Gig A. Byte needs to store text made up of the characters A with frequency 6, B with frequency 2, C with frequency 3, D with frequency 2, and E with frequency 8. Professor Byte suggests using the variable length codes:
Character Code
A 1
B 00
C 01
D 10
E 0
The professor argues that these codes store the text in less space than that used by an optimal Huffman code. Is the professor correct?

Answers

Answer:

This is not true

Explanation:

The optimal Huffman code is used to encrypt and compress text files. It uses fixed-length code or variable-length code for encryption and compression of data.

The professor's character code is similar to Huffman's variable-length coding which uses variable length od binary digits to represent the word strings. The file size of the text file above is;

= 6 x 1 + 2 x 2 + 3 x 2 + 2 x 2 + 8 x 1 = 28 bits

This would be the same for both cases.

The encrypt would be the problem as the encoded and decoding of the characters B and E may cause an error.

Which tools can Object Drawing Mode be applied to?
Line tool
Rectangle Tool
Oval Tool
Pencil tool
Pen Tool
Brush Tool

Answers

Answer:

• Line Tool

• Rectangle Tool

• Oval Tool

• Pencil Tool

• Brush Tool.

Explanation:

When people want to animate when using the Adobe Animate CC, it is vital for them to know how to draw shapes like squares, lines, ovals, rectangles, and circles. This is to enable such individuals understand how to draw objects as it can be difficult if they do not know how to draw these shapes.

The tools that Object Drawing Mode be applied to include:

• Line Tool

• Rectangle Tool

• Oval Tool

• Pencil Tool

• Brush Tool.

When the tool is being selected, it should be noted that the option for the drawing mode will be shown in the Property Inspector panel or it can also be seen in the tools panel.

What is the main advantage of using a WYSIWYG (“what you see is what you get”) editor when constructing a website?
Only one programming language is required.
Websites may have more professional construction.
Knowledge of HTML is not required.
Website templates are not necessary.

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct answer among the given options to this question is:

Knowledge of HTML is not required.

Because when you are constructing a website using WYSIWYG (“what you see is what you get”) editor, then you don't need the knowledge of HTML. Because, when you use WYSIWYG editor to insert button, table, images, text, paragraph, etc. It will automatically insert HTML code behind the page. For example, you can insert a form and a submit button using drag and drop with the help of WYSIWYG (“what you see is what you get”)  editor, for this purpose, you don't need exact knowledge of HTML. WYSIWYG (“what you see is what you get”)  automatically inserts the HTML for the form and button on a website page.

While other options are not correct because:

Using the WYSIWYG (“what you see is what you get”)  editor, you can use different programming languages in your website, such as VB.net, Asp.Net, C#, Javascript, Bootstrap, etc. It is not necessarily that you may have more professional construction and in WYSIWYG (“what you see is what you get”)   website templates are mostly used and modified using WYSIWYG editor.

Answer:

(C):Knowledge of HTML is not required.

How might use of computer and knowledge of technology system affect personal and professional success

Answers

Answer:

social media

Explanation:

For things like school, you should have a more serious:

Answers

Answer:

who and what do you mean

Explanation:

Explain how the use of Git and a shared public Git repository simplifies the process of managing opensource development when many developers may be working on the same code. Support your answer with an appropriate visual that you find from the internet.

Answers

Answer:

Git is a collaborative software used by members of a group to share and work on the same projects. Github is a web application that uses git to link people working together on a codebase. With git and Github, opensource projects can be accessed and collaborated on by volunteers.

Explanation:

Opensource development is a collaborative group of developers working together on a software or platform with a general public license. When working on an opensource project, each developer is able to folk or get a copy of the repository downloaded to a local computer which they can work on and push or update to the actual online repository if the condition for a change is met.

Please have a look at the screenshot below

Answers

C. Reliability

Because of the network and recovery time



Plz give brainliest

In C 11, the ________ tells the compiler to determine the variable's data type from the initialization value.

Answers

Answer:

auto key word

Explanation:

the auto keyword in c++11 can be regarded as one of the features of

“Type Inference” . It should be noted that in In C ++11, the auto key word tells the compiler to determine the variable's data type from the initialization value.

Which item is essential to know before sketching a navigation menu flowchart?
template specifics, such as horizontal or vertical menu layout
whether or not the site will implement a search feature
all of the pages in the site and the content each page will contain
who will be using the site and the design theme selected for them

Answers

Answer:

A, template specifics, such as horizontal or vertical menu layout

Explanation:

Answer:

D. who will be using the site and the design theme selected for them

Explanation:

I am doing the exam right now.

Write a program (using functions) starting from directives to compute and display the transpose of a matrix of dimension m x n. [Note: Here, transpose of a matrix means the element at row r and column c in the original is placed at row c and column r of the transpose]. (Programming in C)

Answers

Answer:

#include <iostream>

#include <cstdlib>

using namespace std;

int m, n;

void transpose(int matrix[]){

  int transp[m][n];

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

     for (int j = 0; j < m; j++){

        transp[j][i] = matrix[i][j];

        cout<< transp[j][i]<< " ";

     }

     cout<< "\n";

  }

}

int main(){

  cout<< "Enter the value for n: ";

  cin>> n;

  cout>> "Enter the value for m: ";

  cin>> m;

  int mymatrix[n][m];

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

     for (int j = 0; j < m; j++){

        mymatrix[i][j] = (rand() % 50);

     }

  }

  transpose(mymatrix);

}

Explanation:

The C source code defined a void transpose function that accepts a matrix or a two-dimensional array and prints the transpose on the screen. The program gets user input for the row (n) and column (m) length of the arrays. The C standard library function rand() is used to assign random numbers to the array items.

what is meant by resources of computer

Answers

This question is not specific enough. However, a computer helps you listen to music, read articles and even novels, draw using online platforms, play games, etc.

How many permutations for a 7 characters in length string, which contains all following letters R, X, S, Y, T, Z, U, has either the string 'RXS' or string 'ZU' in the 7 characters string?

Answers

Answer:

Following are the solution to this question:

Explanation:

In the following forms, RXS can appear:  

[tex]R X S \_ \_ \_ \_[/tex] it may look like that really, [tex]4 \times 3 \times 2 \times 1[/tex] forms = 24 may construct the remainder of its letters.  

[tex]\_ R X S \_ \_ \_[/tex] it may look like that really,  [tex]4 \times 3 \times 2 \times 1[/tex] forms = 24 may construct the remainder of its letters.  

[tex]\_ \_ R X S \_ \_[/tex] it may look like that really, [tex]4 \times 3 \times 2 \times 1[/tex] forms = 24 may construct the remainder of its letters.  

[tex]\_ \_ \_ R X S \_[/tex] it may look like that really,  [tex]4 \times 3 \times 2 \times 1[/tex] forms = 24 may construct the remainder of its letters.  

[tex]\_ \_ \_ \_ R X S[/tex] it may look like that really,  [tex]4 \times 3 \times 2 \times 1[/tex] forms = 24 may construct the remainder of its letters.  

And we'll have a total of [tex]24 \times 5 = 120[/tex] permutations with both the string RXS.

In the following forms, UZ can appear:

[tex]U Z \_ \_ \_ \_\ _[/tex]  They can organize your remaining 5 characters through 5 categories! Procedures [tex]= 5 \times 4 \times 3 \times 2 \times 1 = 120[/tex]

[tex]\_ UZ \_ \_ \_ \_[/tex] They can organize your remaining 5 characters through 5 categories! Procedures [tex]= 5 \times 4 \times 3 \times 2 \times 1 = 120[/tex]

[tex]\_ \_ U Z \_ \_ \_[/tex]They can organize your remaining 5 characters through 5 categories! Procedures  [tex]= 5 \times 4 \times 3 \times 2 \times 1 = 120[/tex]

[tex]\_ \_ \_ U Z \_ \_[/tex]They can organize your remaining 5 characters through 5 categories! Procedures  [tex]= 5 \times 4 \times 3 \times 2 \times 1 = 120[/tex]

[tex]\_ \_ \_ \_ U Z \_[/tex] They can organize your remaining 5 characters through 5 categories! Procedures  [tex]= 5 \times 4 \times 3 \times 2 \times 1 = 120[/tex]

[tex]\_ \_ \_ \_ \_ U Z[/tex] They can organize your remaining 5 characters through 5 categories! Procedures  [tex]= 5 \times 4 \times 3 \times 2 \times 1 = 120[/tex]

There may be [tex]120 \times 6 = 720[/tex] ways of complete permutations.

write the code that writes access granted if the correct password, swordfish is entered and access denied! otherwise

Answers

In python 3.8:

if input("Enter password: ") == "swordfish":

   print("access granted")

else:

   print("access denied!")

One vulnerability that makes computers susceptible to walmare is:
A. A using antimalware software
B. Using password software
C. Using old versions of software
D. Using encryption on sensitive files

Answers

C using old versions of software

Write a function that accepts a pointer to a C-string as an argument and returns the number of words contained in the string. For instance, if the string argument is 'Four score and seven years ago,' the function should return the number 6. Demonstrate the function in a program that asks the user to input a string and then passes it to the function. The number of words in the string should be displayed on the screen.

Answers

Answer:

To preserve the original format of the answer, I've added it as an attachment

Explanation:

This line defines the function

int countWords(const char ptr){

   

This line initializes number of words to 0

   int words = 0;

The following iteration is repeated until the last character in the argument is reached

   while(*(ptr) != \0){

This checks if current character is blank

       if(*ptr==  ){

If yes, then it increments number of words by 1

        words++;

 }

This moves the pointer to the next character

       ptr++;

   }

This returns the number of words in the argument

   return words+1;

}

The main begins here

int main() {

This declares user input as a character of 200 length

   char userinput[200];

This prompts user for input

   cout << Enter a string: (200 max): ;

This gets user input

cin.getline(userinput, 200);

This passes the c-string to the function and also prints the number of words

cout << There are  << countWords(userinput)<< words;

Networks and the interconnectivity of media have affected our society in that:
A. information is hard to get and has not been democratized.
B. countries have shifted away from a global economy.
C. ideas and information are shared quickly and easily.
O
D. the quantity of media now loses out to quality.

Answers

Ideas and information are shared quickly and easily

Answer:

C. Ideas and information are shared quickly and easily

Explanation:

Which type of error occurred in the following lines of code?


>>> print(9 / 0)

Traceback (most recent call last):

File " ", line 1, in

9/0

ZeroDivisionError: division by zero
Answer choices:
reserved word error

logical error

exception

syntax error

Answers

Answer: Logical Error

The division by 0 is a logical error.

Which statement is true?
1)A deque is a type of collection,
2)A collection is a type of deque.
3)A list is a type of deque.
4)A deque is a type of list.

Answers

Answer:

1. A deque is a type of collection.

Explanation:

The statement that is true is as follows:

A deque is a type of collection.

Thus, the correct option for this question is A.

What is Deque?

Deque may be defined as an ordered and systematic collection of items similar to the queue. It is also known as a double-ended queue. It consists of two ends, a front, and a rear, and the items remain positioned in the collection.

According to the context of this question, a deque is a kind of collection that holds data and information identical to a queue. From here, elements can be added to or eliminated from either the front or back very efficiently.

It is also often called a head-tail linked list. Though properly this signifies specific data with appropriate structure that has been the implementation of a deque.

Therefore, a deque is a type of collection that is a true statement. Thus, the correct option for this question is A.

To learn more about Deque, refer to the link:

https://brainly.com/question/16750037

#SPJ2

Other Questions
Exactly how many planes contain points J, K, and N?O 0O 1 O 2 O 3 (FREE BRAINLIEST I NEED HELP PLEASE BAIL ME OUT)Find the constant of proportionality in a graph. Be sure to include the units with the value.Constant of Proportionality = What relationship had King Henry VIII and Sir Thomas More? Jillian is selling boxes of cookies to raise money for her basketball team. The 10 oz. box costs $3.50, while the 16 oz. box costs $5.00. At the end of one week, she collected $97.50, selling a total of 24 boxes. The system of equations that models her sales is below. x+ y= 243.50x + 5.00y = 97.50Solve the system of equations. How many 10 oz. boxes were sold?691215 Solve by using elimination. Express your answer as an ordered pair. Isabel y Elena son dos hermanas que 1. preparan para una fiesta de quinceaera. Debemos acostar 2. temprano esta noche, dice Isabel. S, y maana yo 3. bao primero. Despus 4. maquillo y 5. pinto las uas. Me gusta preparar 6. lentamente, dice Elena. Es verdad, dice Isabel. Siempre 7. preparas ms lentamente que yo. La noche de la fiesta Elena 8. arregla el pelo primero y luego ayuda a Isabel. Las dos 9. visten y salen para la fiesta a las seis y media. what statement describes the national government under the articles of confederation Is point 25,20 on the line Which expression is equivalent to one over threep + 15? WILL GIVE BRAINLIEST one over three(p + 45) one over three(p + 5) 3(p + 45) 3(p + 5) Which of the following statements is true?Opportunistic bacteria only cause infection under certain conditions.Most bacterial infections are caused by bacteria already in the body.Leukocytes are the first line of defense against pathogenic microorganisms.The flu and the common cold are treated with rest, fluids, and antibiotics. WILL NAME BRAINLEST ONGGG There are 14 green crayons and 28 red crayons in a bin. What is the ratio of green crayons to red crayons in simplest form? Help me please solve this Joaquin is four more than half Marjories age. Marjorie is also 32 less than three times Joaquins age.How old is Marjorie? According to both Passage A and Passage B, which inference can be made about artists? A Artists are very aware of the artistic work created by others. B Artists spend time drafting and sketching in order to create a final product. C Artists must study the way in which the human body works in order to create art. D Artists decide on a concept for a product almost immediately and then work to achieve the end result. 2. (1) A piece of rubber is 50 cm long when a weight of35 N hangs from it and is 85 cm long when a weightof 70 N hangs from it. What is the spring constantof this piece of rubber? The height of a pebble dropped from a cliff 20,00 feet heigh is described by formula h(t)=20,000 + 5t^2. How long will the pebble take to reach a height of 32,500 feet? Match the item with the section of the marketing plan it belongs in. To match the items, click the item, and then click the section.Match the item with the section of the marketing plan it belongs in.To match the items, click the item, and then click the section.The amount you plan to spend on each promotional strategy.Marketing messageThe number of sales you plan to have in the next year.Product descriptionStrengths and weaknesses of other companies that provide similar products.Other marketing goalsThe message about your product's benefits that you plan to convey to your target market.BudgetThe percentage of customers who say they are highly satisfied in your customer profile survey.CompetitionThe qualities you want to have people associate with your product.PricingA list of the product's features.Market researchHow the cost of your product will support your brand image and marketing message.Brand image goalsA description of general economic trends and how they are likely to affect the target market.Promotional strategiesWays you will communicate with your target market.Financial goals 3 A trainer for a soccer team keeps track of the amount of water players consume during practice. The trainer observes that the average amount of water consumed by the team is a linear function of the temperature. The graph and equation for this function are shown. Choose True or False for each statement. True 7.8 a. For every degree increase in temperature, the average amount of water consumed increases by 0.0875 gallons. False 7.2 b. When the temperature is below 74 degrees, the team consumes no water. Water (gal) True 6.6 64 False 6.0 0 X True 0 74 76 78 80 82 84 86 88 90 92 94 C. When the temperature is 86 degrees, the team consumes somewhere between 7 gal and 7.2 gal of water. Temperature (F) False w = 0.0875t 0.45, where w represents the average amount of water consumed, and t represents the temperature on that day. True d. The amount of water consumed by the team decreases by 0.45 gallons for every degree the temperature falls, False S What is the area of a rectangle with a length of 1/3 yards and width of 3/4 yard?