Pointers In C++

  • Uploaded by: Zahidur Ovi Rahman
  • 0
  • 0
  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Pointers In C++ as PDF for free.

More details

  • Words: 123
  • Pages: 1
Q:\Documents\others\Software Design II\software design 2\pointers tutorial\pointer.c

06 November 2009 23:57

/*pointers story infolded*/ //using the &(address calling) and *(address allocation) operators #include <stdio.h> int main(void) { int a; //a is an integer int *aPtr; // aPtr is a pointer that points the address 'aPtr'. this pointer is used for an integer a = 7; //integer is allocated to the variable 'a' aPtr = &a; //aPtr will be allocated to the contents of whatever is in the address of 'a' printf("the address of 'a' is %p" "\nthe value of aPtr is %p", &a, aPtr); printf("\n\nthe value of a is %d\nthe value of *aPtr is %d" , a, *aPtr); printf("\n\nshowing that * and & are complements of eachother\n&*aPtr = %p\n*&aPtr = %p\n" ,&*aPtr,*&aPtr); }

-1-

Related Documents

Pointers In C
November 2019 17
Pointers In C++
June 2020 6
Pointers
November 2019 36
Pointers
May 2020 9

More Documents from ""