Connect with a knowledgeable community and get your questions answered on IDNLearn.com. Ask any question and receive comprehensive, well-informed responses from our dedicated team of experts.

Write a program that defines an object of type double. Define a pointer that points to that
object. Print the value of the pointed-to object by dereferencing a pointer.


Sagot :

Answer:

#include <iostream>

using namespace std;

int main()

{

   //make a double

   double object = 1.5;

   //make a pointer

   double* pointer;

   //make the pointer point to address of the object

   pointer = &object;

   //print by dereferencing a pointer

   cout<<*pointer;

   return 0;

}

Your participation means a lot to us. Keep sharing information and solutions. This community grows thanks to the amazing contributions from members like you. Your search for solutions ends here at IDNLearn.com. Thank you for visiting, and come back soon for more helpful information.