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
Lena [83]
2 years ago
8

Please explain this code line by line and how the values of each variable changes as you go down the code.

Computers and Technology
1 answer:
Scilla [17]2 years ago
6 0

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;

}

You might be interested in
You want to use a wireless keyboard and mouse with your laptop computer. which method should you use
Viefleur [7K]
If someone wants to use a wireless keyboard and mouse with a laptop computer, below are the steps.

First check if there’s a USB receiver attached to the mouse or keyboard. If there is, see below steps.

1. Connect the USB receiver of both mouse and keyboard into the USB port of your laptop computer. Some USB dongle would ask you to install or add it your device, just click OK and then add.
2. Make sure that the batteries on your wireless keyboard and mouse are working. And also check if the keyboard and mouse are turned on or have power.
3. Check if there’s a “connected” indication for both wireless mouse and keyboard on your laptop. You can now use your wireless mouse and keyboard on your laptop.

If there’s no USB receiver, and you’re using a bluetooth wireless mouse and keyboard, below are some steps to follow.

1. Turn on bluetooth connection on your laptop.
2. Make sure that batteries are working and turn on both wireless mouse and keyboard.
3. On your laptop, find your wireless mouse and keyboard under bluetooth option and connect the devices. You can now use your wireless bluetooth mouse and keyboard for laptop.
4 0
3 years ago
What is the computer system cycle called?
natita [175]

Answer:

he fetch–decode–execute cycle, or simply the fetch-execute cycle

mark me brainliestt :))

3 0
2 years ago
In addition to MLA, what are some other widely used style guides? Check all that apply.
STALIN [3.7K]

Answer:

In addition to MLA, <u>American psychological association, Associated Press and Chicago manual of style</u> are widely using referencing techniques,

Explanation:

<u>American Psychological Association(APA)</u>

APA is the largest organization of scholars, they have their own referencing style guidelines that is used by these scholars.

<u>Associated Press</u>

It is also an american based agency that have their own referencing style for citation of research work named as Associated press.

<u>Chicago Manual of Style</u>

It is also an american referencing style used for reference.

8 0
3 years ago
Antiglare screens are sometimes called ____.
yaroslaw [1]
Simply a glare screen, because it clearly states what it protects one against, I guess.
8 0
3 years ago
100 POINTS
agasfer [191]

Answer:

i'm just a kid ku ku ku ku ku ku ku ku ku ku ku ku

6 0
2 years ago
Other questions:
  • A(n) _________ is an attempt to learn or make use of information from the system that does not affect system resources.
    13·1 answer
  • If the current through a heater coil is 5 amp and the supply voltage is 120 volts, the coil resistance is A. 0.04 ohm. B. 24 ohm
    6·1 answer
  • How do humans feel about being abducted?
    12·2 answers
  • Pretrial services programs are also known as early intervention programs. <br> a. True <br> b. False
    15·1 answer
  • Why would a brokered CD pay more than a regular CD?
    13·1 answer
  • 15) the following statement describes government depository librearies , except:
    12·1 answer
  • Give an example of an input device, an output device, a storage device, and a networking device.
    10·1 answer
  • How is a microkernel architecture different from a monolithic architecture?
    5·1 answer
  • A blue NFiPA label indicates: A) Health Hazard B) Special information C) Flammability D) Reactivity
    6·2 answers
  • ______ are used to store all the data in a database.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!