#include <iostream.h>
#include <conio.h>
void main ()
{
int array[5] = { 11, -2, 30, 41, 15 } ;
int *pointer ;
clrscr () ;
pointer = array ; /* Array name is used as a pointer */
cout<<"The array elements are...." ;
while ( pointer < pointer + 5 )
{
cout<<*pointer<<endl;
pointer++ ;
}
getch () ;
}
0 comments:
Post a Comment