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

In contrast to sixty percent of kindergarteners having good cognitive skills that make them more likely to succeed, how many have the necessary social skills to
A logo is 15 cm wide. If the logo is dilated by a factor of 7/4, find the width of the logo
The slope of a line that is perpendicular to another line, is the negative reciprocal. The negative reciprocal means that you flip the fraction and change the s
thank for all of the
What is the answer to this?
Why is it important to use color when preparing a presentation aid?
I need help doing this please. It’s an image
PLSS I NEED HELP :( What metal did Sumerians learn to use? A.bronze B.iron C.nickel D.steel
Find the Range of the Graph ASAP dudeeeeesssssss A) -3 ≤ y ≤ 2 B) -3 and 2 C) -3 ≤ y ≤ 3 D) -2 ≤ y ≤ 3
What do you mean by life process?​