#include<stdio.h>
#include<iostream.h>
#include<conio.h>
main()
{
clrscr();
int a=5;
int *p=NULL; //scalar address , address of litral not allowed
cout<<p<<endl<<*p;
int *q=0; //A NULL pointer is a pointer that does not point
// to any memory location. It store the base address of the segment
cout<<endl<<q<<endl<<*q;
//int *r=nullptr;
//int *r=null;
getch();
return 0;
}
No comments:
Post a Comment