A function getints has been defined that has no parameters and returns an array of integer values. The first value in the array contains the total number of items in the array (including itself). Write code (not a function or main) to: Write a prototype for getints() Call getints() From the resulting array, print the first value (after the length) and the last value, each on a separate line.

Answers

Answer 1

Answer:

Explanation:In the below code : Create method getints() : with no arguments and integer array return type Inside method : Declare n integer Input n Declare integer array with n length : arrInt Assign n at 0th array index Use loop from 1 to n: i counter Input arr... view the full answer

Answer 2

Function getints  is presented in the Prototype of the following code will be:

// Prototype

int* getints();

What is function getints?

This function requests an integer from the person using it and then returns it. You can ask for the integer using a prompt argument.

Older OSes used the C method getch() to collect user input. Depending on the function call, it only allows one input character at a time. Unless the user supplies input, the program's execution is halted.

For trhe Prototype the code will be:

// Prototype

int* getints();

For the getints the code will be:

// Call getints()

int* array = getints();

The print values will be:

// Print the first and last value

printf("The first value is %d\n", array[1]);

printf("The last value is %d\n", array[array[0]]);

Learn more about  function getints, here:

https://brainly.com/question/30928705

#SPJ2


Related Questions

Which syntax is used to output the line "Hello" and move to a new line?

Answers

Answer: System.out.println("Hello")

Create an 80x86 program that define an array of doubleword numbers then read two values, first one indicates how many actual numbers will be in the array, and an integer n. The program should display all of the numbers in the array that are greater than the number n.

Answers

The program requires user to read a specified number of values beyond a set limit from a given array. The program which performs this task is written in python 3 thus :

from random import randint

#import the randomint module

import random

#import the random module

double_list = [randint(11, 99) for p in range(0, 10)]

#randomly selects a list of 10 double integer values

def rand_num(lis, n_values , n):

#initialize a function named rand_num which takes in 3 parameters

filter = [val for val in lis if val > n]

#filters the variables to contain those only greater than the specified limit

arr_ = random.sample(filter, n_values)

#using the sample function, select the stated number of values from the filtered list

return arr_

#return the selected values

n_values = int(input('Enter number of values : '))

#prompts user for the length of array

n = int(input('Enter limit : '))

#prompts user for the limit of the values to be included in the array

print(rand_num(double_list, n_values, n))

#A sample run of the program is given and output attached.

Learn more :https://brainly.com/question/25434178

characteristics of special computers​

Answers

Speed, Accuracy, Diligence, Versatility, Reliability, and Memory!

Do you trust machine learning application?

Answers

Answer:

Trusting a machine learning model, in general, can be interpreted as creating a robust model which gives largely accurate results and has a high generalization ability. Classification models learn from past experience, so the robustness of a model primarily depends on the given training set

Explanation:

Hope it helps

                         Please mark as brainliest

It specifies the amount of memory needed to store data.

Answers

magbigay ng limang magandang lugar na tinatawag na tourist spot sa iyo sa inyong lugar o probinsya

Answer: Is it RAM? Random Access Memory

Explanation: Ram is used to reading/writing data. It might control the amount of memory that is stored.

If a company gave you a free version of their software and encouraged you to try and improve it and share it with the only community, what kind of software would this be?

Answers

Answer:

Explanation:

crm

by what order of magnitude is something that runs in nanoseconds faster than what runs in milliseconds

Answers

A nanosecond is a billionth of a second, whereas a millisecond is a thousandth of a second. The nanosecond process is 1,000,000 times faster. Briefly explain two breakthroughs in the history of computing.

1. A is printed at the bottom of each page.​

Answers

Answer:

b is also printed at both page

Explanation:

I need to do because c can also pri Ted at all side

hope its help you

please mark as brainliest

What device do e-learning applications usually use to help users with visual
impairment read digital content?

Answers

The answer is Screen Readers.

a. In cell K11, create a formula using the DCOUNT function to count the number of projects with final costs of more than $100,000, using the data in the entire Projects table (Projects[#All]) and counting the values in the column of final costs ("Final Cost") that are equal to the values in the range J9:J10

Answers

Answer:

the data in the entire Projects table (Projects[#All]) and counting the values in the column of final costs ("Final Cost") that are equal to the values in the range J9:J10

What is that called…. Ethetnet cable port or what !?

Answers

Answer:

The left one is a router or switch or hub (could be any as far as I see).

The right one is a satellite dish.

Explanation:

"A switch transmits data from one device to another in form of frames while a router transmits data from one network to another in form of packets. A hub transmits data from one device to another in form of binary bits." - from section.io

"A satellite dish is a dish-shaped type of parabolic antenna designed to receive or transmit information by radio waves to or from a communication satellite." - Wikipedia

what is the internet revolution?

Answers

The answer is B.
Hope this helps.

Answer:B

Explanation:

By using ONLY the language of C++,

How many times the loop will be executed?

int odd = 1, sum = 2, count = 9;

do {

sum = sum + odd;

odd = odd + 2;

cout >> sum

count = count + 1;

}

while (count < 10)
}


MCQs:

A) 1
B) 2
c) 0
d) 3

Answers

Answer:

0

Explanation:

Answer: Syntax error. So it would be 0.

After correcting syntax it would be 1

Explanation:

Braces never started in beginning but put in the end after while loop

Freeze column A and rows 1 through 3 in the worksheet

Answers

The question tells us that we are dealing with an Excel Worksheet task.

The most popular workbooks are:

"MS Excel" and "G-Sheets"

The purposes of this question we will consider both.

Columns in either of the two types of worksheets mentioned above refer to the Vertical Grids which run through the sheets.

Rows on the other hand refer to the Horizontal Grids which run through the sheets. Both Columns and Rows comprise Cells.

Freezing in this sense refers to the act of ensuring that regardless of which direction the worksheet is scrolled, the frozen parts remain visible on the screen.

How to Freeze Column A and Rows 1 to 3

In "MS Excel":

Open Microsoft Excel Click on Blank WorkbookClick on Cell B4 to highlight itOn the ribbon above, click on view to display its sub-functionsselect Freeze Panes

This action will freeze the entire column A as well as Row 1 to 3. To increase the number of rows from 1-3 to 1 to 5 for instance, you'd need to return to the View Function, Unfreeze the Panes, select Cell B6 then select Freeze Panes.

In "G-Sheets"

Ensure that your computer is online, that is, connected to the internetOpen "G-Sheets"Place your mouse cursor on cell B3 and click to highlight itWith your click on View in the ribbon above. This will display the Freeze function in "G-Sheets" along with its subfunctionsSelect the "Freeze + Up to row 3".  This action will freeze Rows 1 to 3.Next, click anywhere in Column ACarry out step 4 above and select "Freeze + Up to column A"

For more about Freezing Work Sheets click the link below:

https://brainly.com/question/17194167

Best sustainable practices for delivering digital technologies to clients

Answers

Answer:

Recommend the client spread out their data centers to distribute energy usage globally.

Explanation:

Have a great day!

The technology can be made sustainable by asking clients to spread the data centers and by sustainably incorporating the design.

What are sustainable practices?

Sustainable practices are the approach that uses technology with respect to the protection of the environment. The social, economic, and environmental balances are established when sustainable computational technologies are implemented.

This practice allows the client to spread the centers and applications globally on a large scale and can be accomplished by building the software once and should avoid redeveloping.

Therefore, to distribute the energy the data centers must be established.

Learn more about computational sustainability here:

https://brainly.com/question/26133975

#SPJ2

What are the chances of a baby zombie to spawn in full golden armor in MC? ​

Answers

Answer:

Baby Zombies can spawn naturally in the Overworld, but they only have a 5% chance to spawn. The player can also spawn one with a Zombie Spawn Egg. Baby Zombies can also be found riding a Chicken, creating a Chicken Jockey.

Explanation:

It is very unlikely for a baby zombie to appear wearing shiny golden armor.

Why is this so?

It is not common for a zombie to appear with armor, and it is even rarer for a baby zombie to wear a full set of golden armor.

The chance of this event happening is different for each version and if any changes have been made to the game. However, in the regular MC with no changes, the chances are usually low.

Learn more about MC

https://brainly.com/question/20307830

#SPJ2

Which of the following statements describe encryption? Check all of the boxes that apply.

It turns data into cipher text.

It makes data unreadable without a decryption key.

It makes using a computer difficult.

It helps secure data.

It shares files with other computers.

Answers

Answer:

It turns data into cipher text, It makes data unreadable without a decryption key, It helps secure data.

Explanation:

I hope this helps

Answer:
A)

B)

D)

Explanation:

Edge 2022

what does project manager do?

Answers

project managers (PMs) are responsible for planning, organizing, and directing the completion of specific projects for an organization while ensuring these projects are on time, on budget, and within scope.

We have noted that there can be no input queuing if the switching fabric is n times faster than the input line rates, assuming n input lines all have the same rate. Explain why this is the case.

Answers

Consider the given data:

Assume packet length=n

Maximum queuing delay= (n–1)D

All packets are of the same length, n packets arrive at the same time to the n input ports, and all n packets want to be forwarded to different output ports.

a)  The maximum delay for a packet for the memory = (n-1)D

b)  The maximum delay for a packet for the bus = (n-1)D

c)  The maximum delay for a packet for the crossbar switching fabrics=  0

Question 8 A data analyst is working with a data frame named stores. It has separate columns for city (city) and state (state). The analyst wants to combine the two columns into a single column named location, with the city and state separated by a comma. What code chunk lets the analyst create the location column

Answers

The programing language, R has a unite unite function in the tidyr package. Hence, the code chunk which let's the analyst create the location column is; unite (stores, "location”, city, state, sep=",")

The syntax for the unite function is ; unite(data,col,..., sep)

data = dataframe from which data is to be extracted `; stores col = name of the new column ;" location"... = dataframes to be merged ; city, statesep = seperator ; ","

Hence, the required syntax goes thus :

unite (stores, "location”, city, state, sep=",")

Learn more : https://brainly.com/question/25534959

switches use resistors in series and parallel and can function well as digital inputs
to electronic control systems.
Select one:
O a. Proximity
O b. Smart
O C. Touch-sensitive
O d. Push button

Answers

Answer:

d push button bc it will cut all power when in off

John receives an encrypted document using asymmetric cryptography from Alex. Which process should Alex use along with asymmetric cryptography so that John can be sure that the received document is real, from Alex, and unaltered

Answers

Asymmetric cryptography is often regarded as Public-key cryptography. It often uses pairs of keys. The process that Alex should use along with asymmetric cryptography so that John can be sure that the received document is real is Digital signature algorithm.

In asymmetric cryptography, the both pair has a public key and a private key.

The Digital Signature Algorithm is simply known to be a Federal Information Processing Standard for digital signatures.

DSA as it is often called is gotten from the Schnorr and ElGamal signature schemes.

It often used for digital signature and its verification and thus shows authenticity.

Learn more from

https://brainly.com/question/13567401

Choose the best option to answer each question. Which output device allows a user to create a copy of what is on the screen? printer speakers earphones display or monitor

Answers

Answer: printer

Explanation:

Which famous British physicist wrote A Brief History of Time?​

Answers

Answer:

Stephen Hawking

The process of redefining the functionality of a built-in operator, such as , -, and *, to operate on programmer-defined objects is called operator _____. a. overriding b. overloading c. initializing d. testing

Answers

It should be noted that the process of redefining the functionality of a built-in operator to operate is known as operator overloading.

Operator overloading simply means polymorphism. It's a manner in which the operating system allows the same operator name to be used for different operations.

Operator overloading allows the operator symbols to be bound to more than one implementation. It's vital in redefining the functionality of a built-in operator to operate on programmer-defined objects.

Read related link on:

https://brainly.com/question/25487186

What is the full form of eniac and univac ?

thanks!!​

Answers

Answer:

ENIAC - Electronic Numerical Integrator and Calculator. UNIVAC - Universal Automatic Computer (First Digital Computer)

Mark brilliant please

Answer:

[tex]ENIAC - Electronic \: Numerical \: \\ Integrator \: and \: Computer[/tex]

[tex]UNIVAC- Universal \: Automatic \: Computer[/tex]

Need help with these plss correct answers
Explain the difference between linear and non-linear motion. What are examples of each kind of motion?

Imagine that an animated film is going to show a character who, although frightened, climbs a narrow mountain trail. What is one of the 12 principles of animation that you learned about in this unit that the animator might want to use in this scene?

Describe how you would use the principle of “staging” in a scene in an animated film that shows a triumphant moment in a soccer game played in a large stadium.

Describe a situation where an animator might choose to intentionally violate the principle of “slow in and slow out.”

Imagine that you had been given the task of animating a crab walking along the seashore. How would you use the animation principle of secondary action to make the scene appear more realistic?

Answers

Answer: The only thing i could find was this I hope this helps you out

Timing and Spacing: The number of frames between two poses, and how those individual frames are placed.

Squash and Stretch: The flexibility of objects to exaggerate or add appeal to a movement.

Anticipation: The setup for an action to happen.

Ease In and Ease Out: The time for acceleration and deceleration of movement.

Follow Through and Overlapping Action: The idea that separate parts of the body will continue moving after a character or object comes to a full stop, and the idea that parts of the body will move at different times.

Arcs: The principle that smooths animation and moves action in a realistic way.

Exaggeration: The pushing of movement further to add more appeal to an action.

Solid Drawing: The accuracy of volume, weight, balance, and anatomy.

Appeal: The relatability (or charisma) of a character.

Straight Ahead Action and Pose to Pose: The spontaneous and linear approach to creating an action using many in-between poses along with the main poses, and the more methodical approach to creating an action using only a few poses.

Secondary Action: The actions that emphasize or support the main action of the animation.

Staging: The setting up of the scene, from placement of characters to the background and foreground elements, to how the camera angle is set up, the lighting and shadows, and more.

Explanation:

Answer:

1. Linear motion is motion in a straight line. Non-linear motion is motion that is not in a straight line. For example when you move your pen in a line it is linear.

2. They might use something to show the mountain and show how big it is. Using effects like this can bring out certain parts and bring out what really is trying to be shown in a movie.

3. The camera angle of the soccer game and the follow with the ball being shown can give a staging looking for what is coming or what is important in that time.

4. You can use it to show how fast a car is going or to show where a person is at on a map in a 3rd person view

5. I would use Arcs because it smooths out the image or video to make whatever your trying to make look more realistic.

Lewis wrote an informational academic paper about deer. He rereads his work and is starting to revise for academic voice.

Which sentence needs to be revised for an academic voice?

The buck, or male deer, is a noble animal that has great speed.
Deer enjoy corn, but they get most of their nutrition from grass.
Some people think they can tame deer, but I just don’t buy it.
Deer tend to be extremely nervous and dash away when startled.

Answers

Answer: C. Some people think they can tame deer, but I just don’t buy it.

Answer:

The answer is C

Explanation:

Hope this helped! :)

rearrange the following procedures in there proper order. use numbers (1-8) to indicate their order of precedence.
.___________crimp
.___________strip cable end
.___________test
.___________untwist wire ends
.___________trim wires to size
.___________check
.___________arrange wires
.___________attach connector​

Answers

Answer:

6 - crimp

1 - strip cable end

8 - test

2 - untwist wire ends

4 - trim wires to size

7 - check

3 - arrange wires

5 - attach connector​

Explanation:

Step 1. Strip cable by inserting into the stripping tool. Rotate the cable in a smooth and even motion to create a clean cut and pull away towards the end of the wire to remove the sheathing.

Step 2. Untwist wire ends. Separate the twisted wires and straighten them out to easily sort in the right order.

Step 3. Arrange wires. Put the wires in the correct order so they can be properly crimped.

Step 4. Trim wires to size. Use the cutting section of the crimping tool to cut them into an even line.

Step 5. Attach connector. Insert the connector so that each of the small wires fits into the small grooves in the connector.

Step 6. Crimp. Insert the connector in the crimping tool. Squeeze the handles to crimp the connector and secure the wires.

Step 7. Check. Take the connector our of the tool and look at the pins to see that they're all pushed down.

Step 8. Test. Lightly tug at the connector to make sure it's attached to the cable.

2. Build a MATLAB program to evaluate ln(x) between [1, 2] that guar- antees up to 10 correct decimal digits using Chebyshev interpolation. Evaluate your function on 100 points on the interval [1, 2] and calculate the absolute error fore each point using MATLAB’s log command as the exact solution. Plot your error profile. Does this agree with the expected level of accuracy?

Answers

who was the father computer

Other Questions
On diesel engines, data from ________ sensors are commonly used to adjust exhaust gas recirculation (EGR) rates. Write blog post on any interesting animal behavior that you have noticed Which sentence has an inappropriate shift in verb tense, is this correct? How do you write 9.6004 10^15 in standard form? What is Mesa Verde National Park famous for? Almost every Western European language descended from ____________, an ancient language family. What was Simon Bolivars view of human rights? ou have space in your garden for 60 small flowering bulbs. Crocus bulbs cost $0.45 each and daffodil bulbs cost $0.65 each. Your budget allows you to spend $35.00 on bulbs. How many crocus bulbs and how many daffodil bulbs can you buy 6. Which objects are listed in order of scale from smallest to largest?Sun, red giant, Earth, galaxyred giant, Sun, galaxy, EarthEarth, Sun, red giant, galaxygalaxy, Earth, Sun, red giant What were the political struggles of the following people?:1) Duke of Bridgewater - Francis Egerton2) James Watt3) Richard Arkwright4) George Stephenson5) Edwin Chadwick administering therapy to an unwell patient is an example of exercising tactical control. PLZ HELP! why it is important to base scientific theories and models on empirical evidence as opposed to other ways of knowing such as religion? Study the chemical equation.Na + Cl2 NaClIs the chemical equation properly balanced? Please Help A projectile fired over level ground has an initial total velocity of 41.3 m/s. It is in the air for 5.1 s. What is the x-component of the projectile's initial velocity? How does sweating during exercise help maintain homeostasis?a) It regulates body temperatureb) It regulates water concentration in the cellsc) It regulates transport between cells.d) It regulates ion concentrations in the cells. what is 2893834 x 5968675 Decide where the first digit of the quotient should be placed without performing division The first digit of the quotient for 2,370 = 24 should be in the Choose... ones tens hundreds thousands What is it called when the government prevents the media from publishing information, rather than punishing it for breaking laws after the fact A college professor wants to survey a sample of students taking his course. Here are some details about his course:He teaches555 sections of the course.There are250250250 total students across those sections.There are505050 graduate students and200200200 undergraduate students taking the course.Each section has about505050 students (some graduate and some undergraduate).The professor wants to take a sample of303030 students for a survey. He suspects that opinions on the survey may differ the most based on student type (graduate or undergraduate), so he wants to design his sample to take that into account. five ponts if there in no existence of planet earth in our solar system