Code Competitions

Coding competition

Monday, 13 May 2013

program display array using pointer.

#include<stdio.h>
#include<conio.h>
void main()
{
    int l[]={10,20,30,40,50};
    int *p,i;
    clrscr();
    p=l;
    printf("\nthe list .....");
    for(i=0;i<5;i++)
    {
        printf("\n %d \t %d .... elements",*++p,i);
    }
    getche();
}

No comments:

Post a Comment