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
These tools gather information from sources such as emails, text messages, and tweets and make the information instantly and pub
babunello [35]

Answer:

Crisis-Mapping

Explanation:

Social networks are characterized by the immediacy of the content that users produce, and that same feature can be transferred to the online mapping of crises and conflicts.

Characteristics Crisis-Mapping:

  • Real-time information processing.
  • Immediacy;
  • Visualization of the aggregated information can allow the detection of patterns that cause new analyzes to be undertaken or work hypothesis to verify.
  • Continuity in the tasks, the maps record activity without interruption during the twenty-four hours of the day and seven days per week.
  • Flexibility in the protocols, since the tasks are distributed and evolve according to the dynamics (the crisis maps evolve with the crisis itself).
8 0
3 years ago
When an entrepreneur has three employees at a busy and growing software company, what is the primary responsibility of the entre
polet [3.4K]

To direct the employees and respond to any calls/emails regarding a problem or upgrade that should be changed/fixed. (I don't know if that's what you wanted)

4 0
3 years ago
Read 2 more answers
Write a program using integers userNum and x as input, and output userNum divided by x four times. Ex: If the input is: 2000 2
STatiana [176]

Answer:

// here is code in c++.

// include header

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

// variables to read input

   int userNum,x;

   cout<<"enter the value of userNum and x :";

   // read the input from user

   cin>>userNum>>x;

   // divide the userNum with x 4 times

   for(int a=0;a<4;a++)

   {

       userNum=userNum/x;

       cout<<userNum<<" ";

   }

       cout<<endl;

return 0;

}

Explanation:

Declare two variables "userNum" and "x". Read the value of these. Run a for loop 4 time and divide the "userNum" with "x" and print  the value of "userNum".

<u>Output:</u>

enter the value of userNum and x :2000 2                                                                                  

1000 500 250 125  

3 0
2 years ago
Write a program that asks length and breadth of a rectangle a calculate its area qbasic​
Natasha_Volkova [10]

Answer:

INPUT "Enter the length";l

INPUT "Enter the width";w

PRINT "The area is ";l*w

5 0
3 years ago
16
mihalych1998 [28]

Answer:

Connecting a new computer to the network.

4 0
2 years ago
Other questions:
  • Suppose that cells B1 through B100 of an Excel spreadsheet contain the quantity of units ordered on each of 100 different days.
    13·1 answer
  • Explain the concept of risk management, including risk identification, assessment, and control.
    5·1 answer
  • Which process refers to starting up a computer?
    9·2 answers
  • What is UNIX? A program for writing documents Graphical interface Internet browser Operating system
    8·2 answers
  • A lever has an effort arm that is 8 meters long and the residence (load) arm that is 1.5 meters long, how much effort is needed
    7·1 answer
  • In C++ write a program that prints out PI as a type double and a type float EXACTLY as shown below. Your program should have ONE
    13·1 answer
  • When Creating a FPS game what basic rules would you add?
    12·1 answer
  • When you use a business class with an object data source, the business class Group of answer choices must have attributes that m
    5·1 answer
  • Nicotine us a dangerous chemical found in Cigarettes; it is accompanied by two other very harmful chemicals. These are
    15·1 answer
  • 5.7 AP-Style MC Practice edhessive
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!