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
PLEASE HELP PROGRAMMING WILL GIVE BRAINLIEST
DaniilM [7]

Answer:

1. would be B.

2. would be D

3. May I ask if it can be multiple answers?

Explanation:

1. In coding a if statement has to follow if something is true or not. If we are talking about a if and then statement it will skip that block and move to the next block of the "then" part of the "if then" Statement if the first part is reported false

2. This is a easy one, so it has to be either a 3.25 GPA or higher or they have to have either 100 hours or more.

3. waiting for a comment back :)

4 0
3 years ago
The answer for this question?
Debora [2.8K]
It will flow from 2 to 1
6 0
3 years ago
What is output by the following?<br><br>print (type("95"))
statuscvo [17]

Answer:

The output is "<class 'str'> ".

Explanation:

In the given python code a print() function is defined. Inside this function, a type() function will use, in which a numeric value is passed in the double quotes (" ") as a function parameter. Double quotes are normally used for print value as a message but in this code, value is not printed because we use the type() function.

  • The type() function Returns the parameter class type of the argument(object).
  • This function is used for debugging. In this function, we pass a single parameter that will return the type of given object.
6 0
3 years ago
How does the use of cloud computing affect the scalability of a data warehouse? a. Cloud vendors are mostly based overseas where
zhenek [66]

Answer:

C. Hardware resources are dynamically allocated as use increases.

Explanation:

Cloud computing is a technique organisations to store and retrieve resources in a remote central database with secure access over the internet. It is able to access large data storage resources that would have cost more if they had implemented one for themselves.

A database or data centre is a online group of servers that is in a subscribed service to authorised users. Storage hardware allocation is dynamic to users, which means that another storage location in issued on every duration of subscription, making it easy to add more storage infrastructure. This defines the scalability of data centres.

4 0
3 years ago
And art for always texting graphics are pasted is known as
Arte-miy333 [17]
<span>A. Mechanical i think sorry if im wrong</span>
6 0
3 years ago
Read 2 more answers
Other questions:
  • A/An is a series of instructions or commands that a computer follows; used to create software
    10·2 answers
  • The Modified Greiss chemical test is used to detect the presence of what chemicals that indicate muzzle to target distance?
    11·1 answer
  • 1. Access and PowerPoint are not included in all configurations of Microsoft Office 2013.
    14·1 answer
  • Write a program that asks the user for a CSV of the NYC Open Data Film Permits: There is a sample file for June 2019 film permit
    9·2 answers
  • How would improving the nutritional health of an entire community impact the overall physical, emotional, and financial health o
    14·1 answer
  • what version of the internet do we use as an interactive social system in which users are able to interact with senders
    7·1 answer
  • Which of these programmers creates the core game engine?
    5·2 answers
  • Dynamics
    11·1 answer
  • True or false? To help improve SEO, your URL should match the title of your blog post, word for word.
    12·1 answer
  • What are the local, state, and national opportunities that may be available to those who participate in CTSOs?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!