Monday, August 1, 2016

ADDRESS OF THE VARIABLE- C Program

FUNCTION WHICH RETURNS ADDRESS OF THE VARIABLE*/

#include<stdio.h>
#include<conio.h>

void main()
{
int *z;
int *fun();
clrscr();
z=fun();
printf(“\n\NPROGRAM FOR CALLING FUNCTION WHICH RETURNS ADDRESS OF THE VARIABLE\n”);
printf(“\n THE ADDRESS IS::%U”,Z);
getch();
}

//CALLED FUNCTION//

int *fun()
{
int p;
return(&p);
}

/************************OUTPUT***********************************

PROGRAM FOR CALLING FUNCTION WHICH RETURNS ADDRESS OF THE VARIABLE

THE ADDRESS IS::65518

*/

No comments:

Post a Comment