Home

Overview

Operators

Ex. Code

Errors

Importance

Links



Overview --

Defining a pointer is easy, but you need to know what type of variable you will be pointing to.  For example:

int *Ted;  // The '*' operator defines a pointer
int Beth = Ted;
  // Beth equal to Ted ( 1776 )
Beth = * Ted;    // Beth equal to value pointed by Ted(25)

Ted contains '1776' which is the address in the memory where the corresponding value, '25',  is assigned to Beth.


Group 1: S. Bhatnagar, S. Guruda, K. Kaul, A. Jain