20120113

Program in Cto display array elements using pointer, arrayinfunc.c

//========================
//Program in Cto display array elements using pointer, arrayinfunc.c
//========================
#include<stdio.h>
void display(int *, int);
int main()
{
int i;
int arr[5]={11,22,33,44,55};
display(&arr[0],5);
return 0;
}
void display(int *j, int n)
{
int i;
for(i=0;i<5;i++)
{
printf("\n Elements are:%d",*j);
j++;
}
}

1 comment:

  1. Program in Cto display array elements using pointer, arrayinfunc.cProgram in Cto display array elements using pointer, arrayinfunc.cProgram in Cto display array elements using pointer, arrayinfunc.c

    ReplyDelete