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
If ClassC is derived from ClassB which is derived from ClassA, this would be an example of ________.
finlep [7]

Answer:

Inheritance

Explanation:

8 0
3 years ago
​___________ contain microprocessors and tiny antennas that allow them to​ receive, store, and transmit​ data, such as the locat
Gwar [14]

Answer:

The correct option is C: Radio frequency identification tags

Explanation:

Radio frequency identification tags also known as RFID tags involves the use of radio waves to​ receive, store, and transmit​ data which are usually stored on a tag that is attached to an object. A tag contains microprocessors and tiny antennas and whether it is in line of sight or not, it can be tracked and information transmitted from it.

4 0
3 years ago
Someone please explain me this​
Ipatiy [6.2K]

Answer:

2×4×6×8× your body

Explanation:

your pottery × 2×4×6×8×10

7 0
3 years ago
Which of the following is an OOP principle that is represented by putting medicine inside a pill capsule to make it easier to sw
Oksanka [162]

Answer:

4.encapsulation

3 0
2 years ago
Point out any special purpose programminglanguage and also for what purpose it wasdeveloped.
cricket20 [7]

Answer: Lisp which is the short for list processing is a special purpose programming language and it was developed for processing strings which is being exploited in the field of artificial intelligence.

Explanation:

Lisp is used for artificial intelligence as it can compute symbolic expressions, so a common lisp which it later came to be known as is used for development of application with artificial intelligence and is being widely used today. Lisp was actually developed in the early 1980s.

3 0
4 years ago
Other questions:
  • What is the size of the program counter for an avr that has a 1 kbyte rom capacity?
    9·1 answer
  • A ___ is a node (or a device) that connects two different networks together and allows them to communicate.
    12·1 answer
  • What symbol do you use to choose a feature for your notes on Notion?
    8·1 answer
  • Proszę daje wszystko potrzebuje tego
    8·2 answers
  • How is DATA sent across a Network?
    7·1 answer
  • Freeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee points
    14·2 answers
  • On a scale of 1-10 how would you rate your pain
    12·1 answer
  • Dwayne wants a variable called "name" to appear in the interpreter and does not want a space after it. Which of these should be
    11·1 answer
  • How do even do anything on Rblx Creator?? Will give branliest for whoever gives me the most info.
    13·1 answer
  • Various types of mouse pointer<br>​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!