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
Explain what a hypervisor application is and what it is used for. Pick a hypervisor application and list its requirements
Masja [62]

Answer:

can u give me more details so that I can help u

8 0
3 years ago
Which describes the first step a crawler-based search engine uses to find information?
Orlov [11]
<span>Crawler-based search engines are what most of us are familiar with - mainly because that's what Google and Bing are. These companies develop their own software that enables them to build and maintain searchable databases of web pages (the engine), and to organise those pages into the most valuable and pertinent way to the user.</span>
5 0
3 years ago
Read 2 more answers
What is the other name of iterative staatement ​
Mademuasel [1]

Answer:

An loop statement

Explanation:

An iteration statement, loop, repeatedly executes a statement, know as a loop body,until the controlling expression is false

8 0
3 years ago
Pls answer 10 points ​
AlekseyPX

Answer:

1. C

5.b

Explanation:

1. Is c because it is in the short cut key

5. Is B because it is the last choice

3 0
2 years ago
Read 2 more answers
) Consider a router that interconnects four subnets: Subnet 1, Subnet 2, Subnet 3 and Subnet 4. Suppose all of the interfaces in
erik [133]

Answer:

Check the explanation

Explanation:

223.1.17/24 indicates that out of 32-bits of IP address 24 bits have been assigned as subnet part and 8 bits for host id.

The binary representation of 223.1.17 is 11011111 00000001 00010001 00000000

Given that, subnet 1 has 63 interfaces. To represent 63 interfaces, we need 6 bits (64 = 26)

So its addresses can be from 223.1.17.0/26 to 223.1.17.62/26

Subnet 2 has 95 interfaces. 95 interfaces can be accommodated using 7 bits up to 127 host addresses can represented using 7 bits (127 = 27)

and hence, the addresses may be from 223.1.17.63/25 to 223.1.17.157/25

Subnet 3 has 16 interfaces. 4 bits are needed for 16 interfaces (16 = 24)

So the network addresses may range from 223.1.17.158/28 to 223.1.17.173/28

4 0
3 years ago
Other questions:
  • __________ involves analyzing a large amount of data to extract knowledge and insight
    13·1 answer
  • Guardrails are often used by employers to protect workers from falls. How high must the top guardrail be above the working surfa
    12·1 answer
  • A user states that when they power on their computer, they receive a "Non-bootable drive" error. The user works with external st
    8·1 answer
  • ​In sql server, the cursor property ____________________ means that the cursor is used for retrieval purposes only.
    9·1 answer
  • You are going to buy a computer, but first you want to do some research to help you select the best model for your need. Where s
    12·2 answers
  • You need to extract data from the system your predecessor created. you discover tables have been created according to the third
    7·1 answer
  • 5. Write the name of the tab, command group, and icon you need to use to access the
    11·2 answers
  • It is a JavaScript property used to call a function after a specified time, in milliseconds​
    9·2 answers
  • Which three pieces of information should be included in an artist statement? Select all that apply.
    11·1 answer
  • A diagram of a ten-node network that uses ten routers
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!