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
adell [148]
4 years ago
11

Write a function addOne that adds 1 to its integer referenceparameter. The function returns nothing.

Computers and Technology
1 answer:
Alekssandra [29.7K]4 years ago
5 0

Answer:

void addOnefunction(int referenceparameter){

   

   referenceparameter = referenceparameter + 1;

}

Explanation:

The function is the block of the statement which performs the special task.

Syntax:

type name(parameter_1, parameter_2,...){

     statement;

}

first, we define the return type of the function like int which return an integer value, a float which returns decimal value or void which returns nothing.

then, define the parameters in the function which takes the value from the calling function and then we can use that parameter in the statement.

we can define any one of the parameters, there is no restriction for define the parameter.

we create the function addOnefunction which return is void and declare the one parameter referenceparameter, integer type.

then, add the parameter with 1 and store in the same parameter.

For adding, we can use the operator '+'.

like,

 referenceparameter = referenceparameter + 1;

You might be interested in
Subana is writing a program which will calculate the mean average of a set of numbers by adding the numbers and dividing the res
marysya [2.9K]

Answer:

Data Type: Double (decimal)

Variable Name: avg

Explanation:

An average of numbers will typically give you a decimal answer. Therefore, you should use the Double data type.

8 0
3 years ago
Read 2 more answers
Please explain this code line by line and how the values of each variable changes as you go down the code.
Scilla [17]

Answer:

hope this helps. I am also a learner like you. Please cross check my explanation.

Explanation:

#include

#include

using namespace std;

int main()

{

int a[ ] = {0, 0, 0};  //array declared initializing a0=0, a1=0, a3=0

int* p = &a[1]; //pointer p is initialized it will be holding the address of a1 which means when p will be called it will point to whatever is present at the address a1, right now it hold 0.

int* q = &a[0];  //pointer q is initialized it will be holding the address of a0 which means when q will be called it will point to whatever is present at the address a0, right now it hold 0.

q=p; // now q is also pointing towards what p is pointing both holds the same address that is &a[1]

*q=1 ; //&a[0] gets overwritten and now pointer q has integer 1......i am not sure abut this one

p = a; //p is now holding address of complete array a

*p=1; // a gets overwritten and now pointer q has integer 1......i am not sure abut this one  

int*& r = p; //not sure

int** s = &q; s is a double pointer means it has more capacity of storage than single pointer and is now holding address of q

r = *s + 1; //not sure

s= &r; //explained above

**s = 1; //explained above

return 0;

}

6 0
3 years ago
Given a list of twenty number count the numbers among the list
Finger [1]

Answer:

Thank you for the points<33

7 0
2 years ago
Image files are grouped into two categories: _____.
EleoNora [17]
It is grouped according to raster and vector format. Raster format are images used in a computer or printed. Vector format stores data and is compressed. 

Examples of common raster formats usually used in a computer are; jpeg, png, bitmap, and gif. Vector formats are; CGM, SVG and 3D vector.
4 0
4 years ago
Please give all the answer​
il63 [147K]

Answer:

am/is=was

are=were

do=did

go=went

eat=ate

have=had

make=made

take=took

see=saw

fly=flew

sell=sold

tell=told

find=found

sent=sent

Explanation:

These are all present/ past tense

I hope this helps.

5 0
3 years ago
Read 2 more answers
Other questions:
  • In statistics, what is the mode of a data set?
    6·2 answers
  • A/an<br> controls the flow of data between a computer and the network.
    8·1 answer
  • Anyone wanna play Bloons tower defense 5 im rank 52
    5·2 answers
  • URGENT!!! Oliver is creating an image of a fruit basket. From the basket, he wants the red apples to stand out among the rest so
    14·2 answers
  • L00000000000000000000000000000000000000000000000000000000l they b00ty tickled
    6·2 answers
  • Use the drop-down menus to complete the steps for rearranging the layout of a form.
    15·1 answer
  • What is the purpose the wait block?
    10·1 answer
  • List and explain three computing devices from the 20th century​
    13·2 answers
  • Point giveaway and brainliest
    7·2 answers
  • By dividing the control plane from the data plane, SDN offers the flexibility to view the entire data plane infrastructure as a
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!