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
kotegsom [21]
3 years ago
7

Pointers are addresses and have a numerical value. You can print out the value of a pointer as cout << (unsigned)(p). Writ

e a program to compare p, p + 1, q, and q + 1, where p is an int* and q is a double*. Explain the results.
Computers and Technology
1 answer:
lukranit [14]3 years ago
8 0

Answer:

#include <iostream>

using namespace std;

int main() {

  int i = 2;

  double j = 3;

 

  int *p = &i;

  double *q = &j;

 

  cout << "p = " << p << ", p+1 = " << p+1 << endl;

  cout << "q = " << q << ", q+1 = " << q+1 << endl;

  return 0;

}

Explanation:

In C++, pointers are variables or data types that hold the location of another variable in memory. It is denoted by asterisks in between the data type and pointer name during declaration.

The C++ source code above defines two pointers, "p" which is an integer pointer and "q", a double. The reference of the variables i and j are assigned to p and q respectively and the out of the pointers are the location of the i and j values in memory.

You might be interested in
What are some examples of productions categorized as non-broadcast productions?
leonid [27]

Answer:

Non-broadcast media incorporates

  • Recorded television
  • Radio
  • Podcasts
  • Internet
  • Streaming services.

Explanation:

Non-broadcast media is a phrase used to represent audio and visual communications that can be obtained at any moment. Non-broadcast media is the knowledge that can be switched on and off, suspended, rewound, and fast-forwarded at certain times.

Examples of non-broadcast productions

Non-broadcast media incorporates

  • Recorded television
  • Radio
  • Podcasts
  • Internet
  • Streaming services.

To learn more about broadcast productions refer:

  • https://brainly.in/question/17335292
  • https://brainly.in/question/44811105

4 0
3 years ago
Help please fast
Pachacha [2.7K]
Bookmark because you can go back to it at any given time to re use it
4 0
3 years ago
Read 2 more answers
2 (01.01 LC)
myrzilka [38]

Answer:

They write code that translates commands to binary code.

Explanation:

Coding or programming is the process of creating instructions for computers using programming languages. Computer code is used to program the websites, apps, and other technologies we interact with every day.

4 0
3 years ago
Look at the following Python code:
aliya0001 [1]

Ump will be assigned to word2

word1[0:3] gets all of the letters from index 0 to index 3 exclusive (that means index 3 is not included)

4 0
3 years ago
Mechanisms that combine memory, processing speed, and knowledge to regulate the analysis and flow of information within the info
gizmo_the_mogwai [7]

Answer:

control processes.

Explanation:

Mechanisms that combine memory, processing speed, and knowledge to regulate the analysis and flow of information within the information-processing system are referred to as executive/control processes.

3 0
3 years ago
Other questions:
  • you are a software engineering consultant and have been called in by the vice president of finance of a corporation that manufac
    10·1 answer
  • Please answer this correctly the underline drop down menu in the font group contains options to underline
    13·1 answer
  • An example of a current disruptive technology is a?
    8·2 answers
  • The most fundamental components of storage that users interact with are the:
    11·1 answer
  • The main parts of a lever are the....
    6·2 answers
  • Within a major students can choose to study a specific area within major. For example a journalism student may study military jo
    8·1 answer
  • Urgent ..algorithm and flowchart to check weather a number is odd or even ???​
    8·2 answers
  • Which line in the following program will cause a compiler error? 1 #include 2 using namespace std; 3 int main() 4 { 5 int number
    12·1 answer
  • How many string object are in 128,55 in python
    7·2 answers
  • Consider the following correct implementation of the selection sort algorithm.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!