Enter 10 number using array and display through pointer. in C Language.


void main()
{
 int no[10],i,*p;
 clrscr();

 printf("enter 10 no:");
 for(i=0;i<=9;i++)
 {
  scanf("%d",&no[i]);
  p=no[0];
 }
 printf("display:");
 for(i=0;i<=9;i++)
 {
  printf("\n%d",*p);
  p++;
 }
 getch();
}

Output
Enter 10 Number:
1
2
3
4
5
6
7
8
9
10

Display
1
2
3
4
5
6
7
8
9
10
Enter 10 number using array and display through pointer. in C Language. Enter 10 number using array and display through pointer. in C Language. Reviewed by Unknown on 7:49:00 PM Rating: 5

No comments:

Powered by Blogger.