enter data using pointer

enter data using pointer - {int a[10],*p,*pe; p=a; pe=p+10;

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//Q7: writ a C++ functions to read ,write and sort array 'a[10]' using pointers? #include<iostream.h> void main ()
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: {int a[10],*p,*pe; p=a; pe=p+10; while(p&lt;pe) { cin&gt;&gt;*p; p++; } for(int i=0;i&lt;10;i++) cout&lt;&lt;endl&lt;&lt;a[i]; }...
View Full Document

Ask a homework question - tutors are online