#include<iostream.h>
#include<conio.h>
void display( int* ) ;
void main( )
{
int number[ ]= { 11, 22, 33, 44, 55 } ;
for( int i = 0; i <= 4; i++)
//passing address of an element to the function
display(&number[i]);
getch( );
}
void display (int *x)
{
cout<<"\t"<<*x;
}
0 comments:
Post a Comment