subject

DESCRIPTION Write a program that:
Declare an int named x with value of 99
Declare a pointer to that int
Declare a reference to that int
Call displayint (see below), pass the pointer to x and the reference to X
Use the pointer to change the value of x to 100
w
Call displayint
Use the reference to change to value of x to 100
Call displaylnt
displayint is a function that accepts two parameters, la pointer to an int, 2 a reference to an int
The function should display the value that the pointer points to and the value that the reference refers to.
The output of this program should look like this:
99
99
100
100
101
101
First two lines: original value of x
Second two lines: after value of x has been set to 100
Last two lines: after value of x has been set to 101.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 07:30, emilyplays474
What key should you press and hold to select and open multiple files at one time? enter alt control esc
Answers: 1
image
Computers and Technology, 23.06.2019 11:00, jolleyrancher78
What are the possible consequences of computer hacking? what is computer piracy? describe some examples. what are the effects of computer piracy? what are the possible consequences of computer piracy? what is intentional virus setting? describe some examples. what are the effects of intentional virus setting? what are the possible consequences of intentional virus setting? what is invasion of privacy? describe some examples. what are the effects of invasion of privacy? what are the possible consequences of invasion of privacy? what is an acceptable use policy and what is the purpose of the acceptable use policy what is intellectual property and how can you use it?
Answers: 1
image
Computers and Technology, 24.06.2019 04:30, LouieHBK
Fall protection, confined space entry procedures, controlled noise levels, and protection from chemical hazards are some of the things that contribute to a safe and
Answers: 1
image
Computers and Technology, 24.06.2019 12:00, yagalneedshelp8338
Match the function to its purpose. fast worth 50pts.
Answers: 1
You know the right answer?
DESCRIPTION Write a program that:
Declare an int named x with value of 99
Declare a point...

Questions in other subjects:

Konu
Mathematics, 27.04.2021 14:00
Konu
Mathematics, 27.04.2021 14:00