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]
3 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]3 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
Give five examples of physical networking.
Vika [28.1K]

Answer:

Local area network (LAN), Wide area network (WAN), Metropolitan area network (MAN), Personal area network (PAN), Others

Explanation:

Others can be classified as peer to peer, bluetooth

6 0
3 years ago
Assume that x is a char variable that has been declared and already given a value. Write an expression whose value is true if an
Oksanka [162]

Answer:

The expression in python is: x.isdigit()

Explanation:

Given

Character variable x

Required

Expression that evaluates if x is decimal or not

The expression in python is: x.isdigit()

If x is digit 0 - 9, x.isdigit() will equal True

Otherwise, it will equal False

8 0
3 years ago
(1)similarities between backspace key and delete key. (2) different between backspace key and delete key. (3) explain the term e
vovangra [49]

Answer:

1.similarity:

  • they are both editing keys

3.ergonomics are designed keying devices that alleviates wrist strain experienced when using ordinary keyboard for long hours

4.

  • .<em>a</em><em> </em><em>click</em> is pressing and releasing the left mouse button once
  • <em>right </em><em>click</em> is pressing the right mouse button once to display a short cut menu with commands from which a user can make a selection
  • <em>double </em><em>click</em> is pressing the left button twice in rapid succession
  • <em>drag </em><em>and </em><em>drop</em> is where by the user drags an icon or item from one location on the screen to another.

3 0
3 years ago
When a user problem cannot be solved by the help desk at the first level of resolution, the problem is ___________ to the second
PIT_PIT [208]

Answer: escalated

Explanation:

7 0
3 years ago
Which elements are visible when a user opens a new PowerPoint presentation?
Mariulka [41]

Answer:

The only element visible is the presentation itself.

Explanation:

All of the other options, such as presenter's assistance, is hidden away from the projector, presentation device, etc. You are the only one that can see the window that shows what slide is next, presenter's notes, etc. <u>In other words, whatever you want the audience to see, that is only what they will see and nothing else.</u>

3 0
3 years ago
Read 2 more answers
Other questions:
  • Which language is the most popular language for writing apple os x?
    9·1 answer
  • 8. Understanding the proper classification of a problem or fault
    10·1 answer
  • This term describes two or more arrays that hold related data, and the related elements in each array are accessed with a common
    15·1 answer
  • Two Smallest (20 points). Write a program TwoSmallest.java that takes a set of double command-line arguments and prints the smal
    7·1 answer
  • A computer byte is the amount of data (measured in bits) that CPU can manipulate at one time/
    8·1 answer
  • create a function that draws a certain number of spaces, followed by a certain number of stars, followed by a newline.
    6·1 answer
  • The Danger zone around a robot is?
    13·2 answers
  • 3. Output the following:<br>a.<br>21%4​
    12·1 answer
  • ____ loses data when it stops receiving electrical power.
    10·1 answer
  • Which of these agents of education empowers the other..........
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!