Archive for February 12th, 2009

h1

Memory Refresher

February 12, 2009

#include<iostream>
#include<cstdlib>

int main()
{
int a[]={1,2,3,4,5};
int*p[]={a,a+1,a+2,a+3,a+4};

std::cout<<p<<’\n’;
std::cout<<*p<<’\n’;
std::cout<<*(*p)<<’\n’;

system(“PAUSE”);

}

Guess what will be the result …