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
Argue whether we can infer anything about a candidate's ability to work in a professional environment based on his or her resume
nevsk [136]

Answer:

Candidates resume shows his way of presenting and organizing.

Explanation:

  • Resume formatting is an important part of a candidate's ability to work. In any professional environment, it's necessary to have a properly formatted resume.  
  • The resume formatting should be up to date with the latest information and data. The formatting involves the borders, headings, grammar, and spelling or typo errors, etc.  
  • But these mistakes can be easily avoided such as proofreading and removing unnecessary details and sloppy fronts.
5 0
3 years ago
Authorized agent Confidentiality Integrity Encryption 6:53 PM ______ means that only people with the right permission can access
mojhsa [17]

Answer:

The answer is "Confidentiality"

Explanation:

Confidentiality alludes to shielding data from being gotten to by unapproved parties. All in all, solitary the individuals who are approved to do so can access delicate information. Imagine your bank records, You ought to have the option to get to them obviously, and representatives at the bank who are assisting you with an exchange ought to have the option to get to them, yet nobody else ought to. An inability to keep up Confidentiality implies that somebody who shouldn't have access has figured out how to get it, through deliberate act or coincidentally. Such a disappointment of Confidentiality, normally known as a breach  can't be helped. When the secret has been uncovered, it is highly unlikely to un-uncover it.

Assuming your bank records are posted on a public site, everybody can realize your bank account number, balance, and so forth, and that data can't be eradicated from their brains, papers, PCs, and different spots. Virtually all the significant security occurrences reported in the media today include loss of Confidentiality.

Thus, in summary, a breach of Confidentiality implies that somebody accesses data who shouldn't be permitted to.

6 0
3 years ago
For a sample of 100 students, the median number of text messages sent per day is 90, the first quartile is 78, and the third qua
crimeas [40]
Less than 78, more than 102,
4 0
3 years ago
With web 1.0 sites, users _________________, whereas with web 2.0 sites, users _________________.
Ket [755]
With the web 1.0 sites, users Passively receive information, whereas with web 2.0 sites, users<span> participate with the site.

In short the answers would be : </span><span>Passively receive information and participate with the site.

Hope this helps !

Photon</span>
3 0
3 years ago
Given the multiplication 65535 x 32768, will the result cause overflow on a 32-bit system? Will the result need more than 32 bit
Alex

Answer:

65535 x 32768 =214 7450880

which is in the range of 32 bit unsigned integers, so there will be no overflow and we wont be in a need of more bits than 32 bit.

Explanation:

An overflow error indicates that software attempted to write down data beyond the bounds of memory.

Each program features a section of memory allocated for a stack. The stack is employed to store internal data for the program and is extremely fast and keep track of return addressing. A program may jump to a neighborhood that reads some data from the disk drive, then it returns from that routine to continue processing the info. The stack keeps track of the originating address, and therefore the program uses that for the return. Kind of like leaving breadcrumbs to seek out your way back. The stack features a limited amount of space for storing. If software attempts to access a neighborhood of the stack beyond its limits, an overflow error occurs.

• signed 32-bit integers support the range [-2147483648,2147483647]

• unsigned 32-bit integers support the range [0,4294967295]

And if you go outside this range, even temporarily, you would like to be very careful. Most cases handle the overflow technically and provide you "wraparound" or "modulo" behavior where carry bits outside the range just disappear and you're left with the low-order bits like the precise result.

In computer architecture of 32 bit, memory addresses, or other data units are those who are 32 bits (4 octets) wide. Also, 32-bit CPU and ALU architectures are those who have supported registers, address buses, or data buses of that size. 32-bit microcomputers are computers during which 32-bit microprocessors are the norm.

6 0
3 years ago
Other questions:
  • It is ________ to pass an argument to a function that contains an individual array element, such as numbers[3].
    5·1 answer
  • How much does a Canon PowerShot G7X cost in America?
    14·1 answer
  • The ____ dialog box in windows vista appears each time a user attempts to perform an action that can be done only with administr
    12·1 answer
  • A_____refers to the entire Excel file
    14·1 answer
  • Create a button to play the playlist <br><br> Java, netbeans
    7·2 answers
  • Systems such as smartphones, appliances, game controllers, cable set-top boxes and automobiles that contain small computers are
    5·1 answer
  • Write a complete Java method that returns an integer. The method declares a Scanner object, then prompts the user for a series o
    12·1 answer
  • A hardware supplier manufactures three kinds of​ clamps, types​ A, B, and C. Production restrictions force it to make 10 more ty
    11·1 answer
  • n what sense is it now possible for a country to be ""occupied"" by an invisible invader that arrives through airwaves and wirel
    6·1 answer
  • Design a flowchart for an algorithm which adds prim numbers starting from 1 up to 50. Change
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!