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
A compressed audio file format developed by the Moving Picture Experts Group is called
8_murik_8 [283]

Answer:

The appropriate response is "MP3 file".

Explanation:

  • MPEG seems to be an association of ISO as well as IEC international organizations that make recommendations for media encryption, comprising processing of sound, illustrations and functional genomics, and file configurations for numerous technologies.
  • MP3 seems to be a sound file stored in something like a compression digital audio created through MPEG consisting utilizes "Layer three" audio processing.
5 0
3 years ago
Choose the proper term to describe each of the following examples.
Lady_Fox [76]

Answer:first 1

Explanation:

4 0
3 years ago
Code example 5-1 import java.util.Scanner; import java.text.NumberFormat; public class WeightConverter { public static void main
Trava [24]

Answer:

It displays an error message from the getDouble() method

Explanation:

The above would be the result because of the following

1. Variable d is declared as a double variable and should be used as such.

2. The getDouble() method is also defined to handle double variables only.

When the program tries to accept at

weightInPounds = getDouble(sc, prompt);

The getDouble method is called immediately and since the value

"two hundred" entered in string, it can't handle this data type and it (the getDouble method) will display an error message

4 0
4 years ago
What is stand-alone LDAP server?
FinnZ [79.3K]

Answer:

A stand-alone LDAP server is defined as to remove the load from a server that does multi function tasks. It is more efficient when we use one or more LDAP configurations .

Light weight Directory Access Protocol (LDAP) is a client and server protocol used for accessing directory data. It  helps in reading and editing the directories over IP networks and runs directly over Transmission control protocol and internet protocol used simple string format for transferring of data.

8 0
3 years ago
Write a programme to find the sum of first three cube number?
aleksandrvk [35]

// Simple Java program to find sum of series

// with cubes of first n natural numbers

import java.util.*;

import java.lang.*;

class GFG {

/* Returns the sum of series */

public static int sumOfSeries(int n)

{

int sum = 0;

for (int x = 1; x <= n; x++)

sum += x * x * x;

return sum;

}

// Driver Function

public static void main(String[] args)

{

int n = 5;

System.out.println(sumOfSeries(n));

}

}

// Code Contributed by Mohit Gupta_OMG <(0_o)>

7 0
3 years ago
Other questions:
  • Match the feature to its function. 1. Normal view provide rows of icons to perform different tasks 2. Notes view an area in whic
    15·2 answers
  • Which is most likely to cause confusion, hinder thinking, and prevent quick access to resources in a study environment? phones c
    5·2 answers
  • What is the name of the table tools contextual tab that appears once you insert a table?
    8·2 answers
  • according to the National Automobile Dealers Association, a single dealership may employ people with as many as 57 different A.
    6·1 answer
  • How do I make sure I have full access to this app where do I put in payment information
    8·1 answer
  • Select the parts of a business letter.
    6·2 answers
  • Although your project has been accepted by the customer, the contract with the system vendor specifies that it will support the
    13·1 answer
  • Select the correct answers
    9·1 answer
  • A ……………………………is used to verify the identity of a website and is issued to the owner of the website by an independent and recogni
    7·2 answers
  • Assignment 2: room area <br>programming python in Project Stem​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!