-->

Header Ads

WAP to access element of array by using call by reference method.

C Program:


//function  call by reference :

#include<stdio.h>

#include<conio.h>

void disply(int *);

void main()

{

int a,mark[]={34,45,56,67,78,89};

clrscr();

printf("array elements are shown below (call by refrence):\n");

for(a=0;a<6;a++)

{

disply(&mark[a]);

}

getch();

}

void disply(int *a)

{

printf("\n%d",*a);

}

Output of c program:


No comments

Powered by Blogger.