Write a value-returning function that receives an array of integer values and the array size as parameters and returns a count of the number of elements that are less than 60.

Answers

Answer 1

Answer:

The c++ function for reversing an array is given. The function is declared void since it returns no value.

void reverse( int arr[], int len )

{

  int temp[len];

  for( int k = 0; k < len; k++ )

  {

      temp[k] = arr[k];

  }

  for( int k = 0, j = len-1; k < len, j>= 0; k++, j-- )

  {

          arr[k] = temp[j];

   }

}

Explanation:

The reverse function uses another array to reverse the elements of the original array.

An integer array is declared, temp[len], having the same length as the input array.

int temp[len];

To begin with, the elements of the input array are copied in the temp array.

for(int k = 0; k < len; k++ )

{

      temp[k] = arr[k];

}

Next, the elements of the input array are given new value.

The temp array, in reverse order, is copied into the input array.

for( int k = 0, j = len-1; k < len, j>= 0; k++, j-- )

{

          arr[k] = temp[j];

}

The above for loop makes use of two variables simultaneously.

While the array, arr is proceeding from first element to the next, the array temp begins with the last element and goes down to the previous element.

Now, the input array, arr, contains the elements in reverse order.

The complete program is given.

#include <iostream>

using namespace std;  

void reverse( int arr[], int len );

void reverse( int arr[], int len )

{

  int temp[len];

 

  for(int k = 0; k < len; k++ )

  {

      temp[k] = arr[k];

  }

 

  for( int k = 0, j = len-1; k < len, j>= 0; k++, j-- )

  {

          arr[k] = temp[j];

  }

 

}

int main()  

{

  int len = 5;    

  int arri[len];    

  for( int l = 0; l < len; l++ )

  {

      arri[l] = l;

  }

 

  reverse( arri, len );    

  return 0;

}


Related Questions

positive and negative of adblock plus

Answers

Answer:

Pros and cons of ad blockers

Remove distracting ads, making pages easier to read.

Make web pages load faster.

Keep advertisers from tracking you across websites.

Reduce bandwidth (especially important with mobile devices)

Reduce battery usage (again, important for mobile devices)

p

Fumiko is a network technician. She is configuring rules on one of her company's externally facing firewalls. Her network has a host address range of 192.168.42.140-190. She wants to allow all hosts access to a certain port except for hosts 188, 189, and 190. What rule or rules must she write

Answers

The rule that she must write is that  A single rule allowing hosts 140–187 is all that is necessary; the default-deny rule takes care of blocking the remaining nonincluded hosts.

What is a Firewall?

A firewall is known to be a form of a network security device that helps one to manage, monitors and filters any form of incoming and outgoing network traffic.

This is often done based on an firm's formerly set up security policies. A  firewall is known as the barrier that exist between a private internal network and the public Internet.

See options below

What rule or rules must she write?

a) A single rule allowing hosts 140–187 is all that is necessary; the default-deny rule takes care of blocking the remaining nonincluded hosts.

b) Multiple rules are necessary for this configuration; one or more rules must define Deny exceptions for 188, 189, and 190, followed by the Allow rule for the 140–190 range.

c) A Deny rule is needed for 188, 189, and 190, and then exception rules for the 140–187 range.

d) The default Deny all rule needs to be placed first in the list, and then an exception rule for the 140–187 range.

Learn more about firewalls from

https://brainly.com/question/13693641

What is a value which we pass to the function to use in place of the parameter when we call it?

A. Parameter
B. Call
C. Procedure
D. Argument

Answers

Answer:
D) Argument

Explanation:
When you call a function, you pass in an argument as the input to use in the place of the parameter.

what is the future of web development

Answers

Answer:

Creating websites that can execute automated tasks and new programing languages revolving around web development.

Explanation:

Text based game project 1

Answers

Answer:

What is your question?

Explanation:

One problem with backlighting is that your subject may squint.

True

False

Answers

Answer:

I would say that's False. Backlighting would be behind them. So they wouldn't need to squint.

Explanation:

Write a program that uses while loops to perform the following steps:
a. Prompt the user to input two positive integers. Variables: firstNum and secondNum
(firstNum must be less than secondNum) (use while loop); create a user-defined function
called validateUserInput() to validate the user's input. Use Call-by-Value.
validateUserInput() is a value returning function.

b. Output all odd numbers between firstNum and secondNum. (use while loop); create a
user-defined function called oddNumbers(). Use Call-by-Value. oddNumbers() is a void
function.

c. Output the sum of all even numbers between firstNum and secondNum. (use while
loop); create a user-defined function called sumEvenNumbers(). Use Call-by-Value.
Declare a variable called sumEven in the main() for the sumEvenNumbers().
sumEvenNumbers() is a valuereturning function. Use sumEven to hold a returned value.

d. Output the numbers and their squares between 1 and 10. (use while loop): create a
user-defined function called displaySquareNumbers(). Call-by-Value.
displaySquareNumbers() is a void function.

e. Output the sum of the square of the odd numbers between firstNum and secondNum.
(use while loop); create a user-defined function called sumSqureOddNumbers(). Use
Call-by-Value. Declare a variable called sumSquareOdd in the main(), for the

sumSqureOddNumbers(). sumSqureOddNumbers() is a value returning function. Use
sumSquareOdd to hold a returned value.

f. Output all uppercase letters. (use while loop); create a user-defined function called
displayUppercaseLetters(). Use Call-by-Value. displayUppercaseLetters() is a void
function.

Answers

The program is an illustration of the loop and functions

Loops are used to perform repetitive operationsFunctions are named code segments that ar executed when called or evoked

The main program

The program written in Python, where comments are used to explain each action is as follows:

#This function validates the user input

def validateUserInput(firstNum, secondNum):

   if firstNum >= secondNum:

       return False

   return True

See attachment for the complete program

Read more about loops at:

https://brainly.com/question/19347842

explains why it is important to select the correct data when creating a chart

Answers

Answer:

to be organized

Explanation:

because when you are organized to select the correct data, you won't confused

Which of the following are vector graphic file formats? Choose all that apply.

AI

PNG

RAW

SVG
Please help

Answers

There are different kinds of files. The option that is a vector graphic file formats is SVG.

What are vector files?

Vector files are known to be a type of images that are created by using mathematical formulas that stands as points on a grid.

The SVG  is known as Scalable Vector Graphics file and it is known to be a  vector image file format as it make use of geometric forms such as points, lines, etc.

Learn more about vector graphic file from

https://brainly.com/question/26960102

Answer:

AI and SVG

Explanation:

learned it from a comment i give all credit to them

Which evidence best addresses the counterclaim?

a story about a girl who becomes a professional athlete after she graduates
quotations from teens and parents who fight with coaches
a story about a boy who gets bad grades because he plays too many sports
an example of how sports may lead to many injuries


an exclamation point
an exclamation point

Answers

Answer:

A. a story about a girl who becomes a professional athlete after she graduates

Explanation:

i hope this helped

I need help with these certain questions on my activities in school

Answers

Answer:

*part 3 multiple choice*

1 d. none of the above

2d. water

3 a. insulator

*The Other Part*

4. electrons change direction of flow frequency in ""alternating current""

2. conductors

i need the full code for 6.1.3 code hs circles and squares please answer please help

Answers

In this exercise we have to use the knowledge in computational language in python  to write a code with circles and squares.

how to draw geometric figures in python?

inputs = 100

radius

   draw_circle(radius);

   pendown()

   begin_fill()

   circle(radius)

   end_fill()

   penup()

left(90)

forward(radius*2)

right(90)  

penup()

setposition(0,-200)

color("gray")

bottom_radius = int(input("What should the radius of the bottom circle be?: "))

draw_circle(bottom_radius)

draw_circle(bottom_radius)

See more about python at brainly.com/question/18502436

Name the test statement that can be used to test the following scenario:
The contents of the variable $TEST are equal to the string “success,” or the number 5, or the contents of the variable $RESULT.

Answers

The test statement is an illustration of conditional statements and logical operators.

The test statement is: if [[ "$TEST" == ”success” || "$TEST" == ”5” || "$TEST" == “$RESULT” ]]

How to name the test statement?

From the question, we have the following scenarios:

Determine if $TEST equals "success"Or $TEST equals "5"Or $TEST equals $RESULT

To do this, we make use of the if conditional statement and the or logical operator.

The or operator is represented with ||

Since the programming language is in php, the test statement is: if [[ "$TEST" == ”success” || "$TEST" == ”5” || "$TEST" == “$RESULT” ]]

Read more about conditional statements at:

https://brainly.com/question/24833629

What should I do instead of listen to music?

Answers

You could watch a movie
Learn something new that you are interested in

what is computers machain?

Answers

Answer:

the electronic device which take data process it and give meaningful results is called computer machine

every CAD application comes with a color menu to help you tailor your selections, mix them properly, and apply them in ways that meet your artistic expectations

true or false

Answers

every CAD application comes with a color menu to help you tailor your selections, mix them properly, and apply them in ways that meet your artistic expectations is a true statement.

What is a color CAD?

In a CAD system, there is found to be colors that are known to be often and  most commonly used to depict line weights.

Note that selecting different colors is easy using varying line thickness. One can then use these colors into layers to smooth the visibility of drawing components that you wants.

Learn more about CAD application  from

https://brainly.com/question/9222927

Answer:true

Explanation:

What is information computer security

Answers

Answer:

Computer security, cybersecurity, or information technology security is the protection of computer systems and networks from information disclosure, theft of or damage to their hardware, software, or electronic data, as well as from the disruption or misdirection of the services they provide.

Explanation:

1.Skills

1.SkillsThe Top Skills Required for Cybersecurity Jobs

1.SkillsThe Top Skills Required for Cybersecurity JobsProblem-Solving Skills. ...

1.SkillsThe Top Skills Required for Cybersecurity JobsProblem-Solving Skills. ...Technical Aptitude. ...

1.SkillsThe Top Skills Required for Cybersecurity JobsProblem-Solving Skills. ...Technical Aptitude. ...Knowledge of Security Across Various Platforms. ...

1.SkillsThe Top Skills Required for Cybersecurity JobsProblem-Solving Skills. ...Technical Aptitude. ...Knowledge of Security Across Various Platforms. ...Attention to Detail. ...

1.SkillsThe Top Skills Required for Cybersecurity JobsProblem-Solving Skills. ...Technical Aptitude. ...Knowledge of Security Across Various Platforms. ...Attention to Detail. ...Communication Skills. ...

1.SkillsThe Top Skills Required for Cybersecurity JobsProblem-Solving Skills. ...Technical Aptitude. ...Knowledge of Security Across Various Platforms. ...Attention to Detail. ...Communication Skills. ...Fundamental Computer Forensics Skills. ...

1.SkillsThe Top Skills Required for Cybersecurity JobsProblem-Solving Skills. ...Technical Aptitude. ...Knowledge of Security Across Various Platforms. ...Attention to Detail. ...Communication Skills. ...Fundamental Computer Forensics Skills. ...A Desire to Learn. ...

1.SkillsThe Top Skills Required for Cybersecurity JobsProblem-Solving Skills. ...Technical Aptitude. ...Knowledge of Security Across Various Platforms. ...Attention to Detail. ...Communication Skills. ...Fundamental Computer Forensics Skills. ...A Desire to Learn. ...An Understanding of Hacking

2.Thesaurus

ThesaurusCybersecurity refers to the practice of securing electronic devices from unauthorized access or attack or the measures taken in pursuit of this practice.

3.Risk assessment

Risk assessmentWhat does a cybersecurity risk assessment include? A cybersecurity risk assessment identifies the various information assets that could be affected by a cyber attack (such as hardware, systems, laptops, customer data, and intellectual property), and then identifies the various risks that could affect those assets.

and last..........is four

4. Field

FieldDifferent branches of cyber security

FieldDifferent branches of cyber securityApplication security.

FieldDifferent branches of cyber securityApplication security.Network and infrastructure security.

FieldDifferent branches of cyber securityApplication security.Network and infrastructure security.Intrusion detection and penetration testing.

FieldDifferent branches of cyber securityApplication security.Network and infrastructure security.Intrusion detection and penetration testing.Digital forensics and incident response.

FieldDifferent branches of cyber securityApplication security.Network and infrastructure security.Intrusion detection and penetration testing.Digital forensics and incident response.Endpoint protection and mobile security.

FieldDifferent branches of cyber securityApplication security.Network and infrastructure security.Intrusion detection and penetration testing.Digital forensics and incident response.Endpoint protection and mobile security.Data governance, risk and compliance.

How many intrusion switches are there in Dell Precision Tower 7920?

Answers

The number of  intrusion switches in Dell Precision Tower 7920 is one.

What is an intrusion switch?

There is an chassis intrusion switch that is often used in the detection of any unauthorized access that is found stepping into the interior of one's system.

This kind of switch is known to be often activated quickly when the system cover is removed and access is done or made to the interior of one's system.

Learn more about intrusion switch from

https://brainly.com/question/24369537

These are raised as livestock for meat and milk EXCEPT one
A. Hog
B. Goat
C. Carabao
D. Cattle

Answers

The livestock that is not raised for  meat and milk is  hog.

What are animals raised for meat?

Livestock are known to be some domesticated animals that are said to be raised in an agricultural farm to give labor and produce things such as meat, eggs, milk, etc.

The animals that are raised for their meat and milk are:

Boar BroilerCattle, etc.

Learn more about animals from

https://brainly.com/question/25897306

Name three things that get information into a computer?​

Answers

Answer:

Input devices do that. Three are the keyboard, a mouse, and a trackball.

Explanation:

what is the name of the extension used to save publisher

Answers

Answer:

PUB

Explanation:

PUB IS THE NAME OF THE EXTENSION USED TO SAVE PUBLISHER

what is containment and why is it part of the planning process

Answers

Answer:

Isolating affected channels, processes, services, or computers; stopping the losses; and regaining control of the affected systems. It is part of the planning process to identify the best containment option for each scenario or system affected.

Explanation:

nivel 1: operadores pedir 2 números al usuario y Sumarlos, restarlos, multiplicarlo y dividirlos ​

Answers

Answer:

¿Esta pregunta no tiene ningún sentido?

Explanation:

¿que estas pidiendo?

Steps of booting a computer

Answers

Steps of Booting
The Startup. It is the first step that involves switching the power ON. ...
BIOS: Power On Self Test. It is an initial test performed by the BIOS. ...
Loading of OS. In this step, the operating system is loaded into the main memory. ...
System Configuration. ...
Loading System Utilities. ...
User Authentication.

The major goal of a good web information
a
retrieval system is

Answers

Answer:

Explanation:

The major objective of an information retrieval system is to retrieve the information – either the actual information or the documents containing the information – that fully or partially match the user's query.

9.12: Element Shifter
Write a function that accepts an int array and the array’s size as arguments. The function should create a new array that is one element larger than the argument array. The first element of the new array should be set to 0. Element 0 of the argument array should be copied to element 1 of the new array, element 1 of the argument array should be copied to element 2 of the new array, and so forth. The function should return a pointer to the new array. Demonstrate the function by using it in a main program that reads an integer N (that is not more than 50) from standard input and then reads N integers from a file named data into an array. The program then passes the array to your element shifter function, and prints the values of the new expanded and shifted array on standard output, one value per line. You may assume that the file data has at least N values.

Prompts And Output Labels. There are no prompts for the integer and no labels for the reversed array that is printed out.

Input Validation. If the integer read in from standard input exceeds 50 or is less than 0 the program terminates silently.

Answers

The Element shifter program illustrates the use of functions and arrays

Arrays are used to hold multiple valuesFunctions are used as subroutines of a program

The Element shifter program

The Element shifter program written in C++, where comments are used to explain each action is as follows:

#include <iostream>

using namespace std;

//This declares the ElementShifter function

int* ElementShifter(int *arr, int size){

   //This declares the new array

   int *newArr = new int[size * 2];

//The following loop populates the new array

   for (int i = 0; i < size * 2; i++) {

       if(i == 0){

           *(newArr+i) = 0;

       }

       else if(i < size+1){

           *(newArr+i) = *(arr+i-1);

       }

       else{

           *(newArr+i) = 0;

       }

   }

//This returns a pointer to the new array

   return newArr;

}

//The main method begins here

int main(){

//This declares and gets input for N

   int N;    cin>>N;

   int myArr[N];

//If N is between 1 and 50

   if(N > 0 && N <=50){

//This populates the array

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

           cin>>myArr[i];

       }

//This calls the Element shifter function

   int *ptr = ElementShifter(myArr, N);

//This prints the new array

   for (int i = 0; i < N*2; i++) {

       cout << ptr[i] << " ";

   }

   }

  return 0;

}

Read more abou C++ programs at:

https://brainly.com/question/27246607

20) Which of the following functions would take the word "Joe" (found in column A) and "Smith" (found in column B), and display "Joe Smith" in column C?

A. COMBINETEXT


B. TEXTJOIN


C. JOINTEXT


D. JOIN

Answers

Answer:

TEXTJOIN

Explanation:

TEXTJOIN is a common function of Ms Excel or Microsoft Excel

This function requires three arguments

delimiterignore_empty text1.

Answer:

TextJoin

Explanation:

Is the functions would take the word "Joe" (found in column A) and "Smith" (found in column B), and display "Joe Smith" in column C.

which of the following is an example of application software

Answers

Answer:

A messaging app

Explanation:

Its an software application you can download, so...yeah.

(You might've thought it was an anti-virus program lol)

Option-D.A messaging app is the correct answer.
A messaging app is an application software that can be installed jn your phone and computer in order to send messages.

What is an Application software?Application software is a type of computer application that performs specific professional, academic, and individualized functions.Each software is designed to assist users with a variety of tasks, some of which may be related to productivity, creativity, or communication.Word processors, media players, and accounting software are examples of application programs.An application program (also known as a software application, application, or app for short) is a computer program created to carry out a specific task other than one related to the operation of the computer itself.The term "app" typically refers to apps for mobile devices such phones. Applications may be published independently or packaged with the computer and its operating system software.They may also be written in proprietary, open-source, or project code.An application can work with text, numbers, audio, visuals, and a combination of these depending on the task for which it was created.Word processing is an example of an application package that focuses on a particular task.On the other hand, integrated software merges several programs.

To learn about the DIfference between application software and Opertaing system click here-
https://brainly.com/question/17798901

#SPJ2

What are the major benefits of preproduction?

Answers

Some of the benefits of preproduction are that it:

Saves time while producingKeeps you on a BudgetYou could have more time to think about how you are going to produce your production.

Hope this could help?

a) Explain any two problems associated with the existing system used by the organization. (25 marks)​

Answers

Answer:

Lack of Strategy

Many of the most common MIS issues can be traced back to a lack of a solid strategy. Information systems leaders are well aware of the many tools available to gather data on their network. But putting that information to use is often a challenge.

At one time, technology departments served as a separate operation, providing tech support and keeping an organization’s server equipment running. Today, MIS leadership often sits alongside other business leaders, working together to ensure that the technology being used supports the overall mission of the company moving forward.

Meeting Organizational Needs

MIS plays an ever-increasing role in organizations, with professionals relying on technology for every aspect of operations. Sales and marketing rely heavily on customer relationship software to track client interactions, for instance, while accounting needs its own software for billing, invoicing and financial tracking.

With more than half of all companies now relying on big data analytics, MIS is playing an even more important role. Before making a decision, today’s management teams are likely to pull reports on existing activity to ensure they use facts rather than make educated guesses.

Explanation:

Other Questions
What happened in 114 B.C. that was unpredictable (naturally explainable)? Help me find Fred's mistakes. I need to know which step Fred messed up on. Answer choices...A. Fred made a mistake in step 1B. Fred made a mistake in step 2 C. Fred made a mistake in step 3D. Fred didn't make a mistake Hi i need help with this please thx u Muhammad Ali donated millions of dollars to charity throughout his lifetime. He was one of the greatest boxers of all time. Quill Each student in Mr. Johnson's sixth-grade class kept track of how many books they read oversummer vacation.Books read024.6810What was the median number of books Mr. Johnson's students read? Given: x1 = 6, x2 = 2.5, y1 = 2.4. Find y2 if the points are (a) directly proportional or(b) inversely proportional After heating up in a teapot, a cup of hot water is poured at a temperature of 208208 F. The cup sits to cool in a room at a temperature of 6868 F. Newton's Law of Cooling explains that the temperature of the cup of water will decrease proportionally to the difference between the temperature of the water and the temperature of the room, as given by the formula below:T=Ta+(T0Ta)ektT=T a +(T 0 T a )e ktTa=T a = the temperature surrounding the objectT0=T 0 = the initial temperature of the objectt=t= the time in minutesT=T= the temperature of the object after tt minutesk=k= decay constantThe cup of water reaches the temperature of 185185 F after 3 minutes. Using this information, find the value of kk, to the nearest thousandth. Use the resulting equation to determine the Fahrenheit temperature of the cup of water, to the nearest degree, after 4 minutes. Enter only the final temperature into the input box. The Sahara Desert makes up more thansquare miles of the African continent.O 30 millionO 1000O 10.000O 3 million Reasons for the formation of civil rights movement? (Yo) le ___ (dar) mucha comida a mi gata. Zey can buy socks online for $3.50 a pair plus a $6 shipping charge. A local storesells socks for $5 a pair.The graph represents the total cost depending on the number of pairs of sockspurchasedChoose the two statements that are true about the graph How far it is Sun to U.S? Please help me on this its due now Read this excerpt from "The Big Shot."In her most recent test, she asked golfers who had just finished playing to find on a chart a black circle that was the same size as a cup on the green. She says, "What we found was that the golfers who scored better selected larger circles," adding that this suggests "that they perceive the hole as bigger." Golfers who didn't score as well chose smaller circles.Which type of image would best help readers understand the study being described and its conclusion? I need help. Please look at the attachments Find the number that makes the ratio equivalent to 5:6.:66 Bry blew 91 bubbles. Ken blew 7 bubbles. Which question would be most appropriate to ask yourself when consideringhow to address your audience for a procedural document?A. Which topic dol want to choose?B. How much are readers likely to know about my topic?C. What information does the library have about my topic?D. Can I draw my own map to illustrate my points? A truck carries a load of 50 boxes;some are 20kg boxes and the rest are 25kg boxes. if the total weight of all boxes is 1175 kg, how many of each type are there? List 3 jobs of a county commissioner. 1.2.3.Who governs a city or town? Who is considered the legislative branch?Who is considered the executive branch?What are city ordinances?