arirodriguezc6767 arirodriguezc6767
  • 14-09-2019
  • Computers and Technology
contestada

Write a CPP Program to read an integer number. Use a pointer to display this numbe

Respuesta :

ExieFansler ExieFansler
  • 18-09-2019

Answer:

#include <iostream>

using namespace std;

int main() {

   int n,*p;

   cin>>n;//taking input.

   *p=n;//passing the address of n to pointer.

   cout<<*p<<endl;//printing the number using the dereferncing operator.

return 0;

}

Explanation:

The above written program in in C++.This program takes input of the integer n and stores the address of the integer in the pointer p. For printing the value of the to which the pointer is pointing we need to used the dereferencing  operator * .

Answer Link

Otras preguntas

Mr. Garza has a picture that measures 4 by 12 inches. It must be reduced so that the longest side measures 4 inches to fit in the school newspaper. Find the len
please hurry !! no linksBrad ordered 6 equal-priced items. If the shipping cost was $7 and he paid a total of $37, how much did each item cost? Write and solve
When faced with especially dense or difficult text, which of the following tactics helps you prepare to dive into the work with some guideposts and expectations
Find the unit rate 10 ounce jar of peanut butter is $3.90
someone please help?
Which statement describes the graph of f(x) = 4x2 20x 25?.
How many times can you make change for 25 cent
Question 4 Which of your fossils are most likely heterotrophs? Which of them are autotrophs? How do you know?
Please help will give 50 or more points and brainliest!
10-(-41)-28 what is the answer of this question