Image

Programs - C Language - Pointer

Program:

#include<conio.h>
#include<stdio.h>
int * func();
void main(){
int *ptr;

 ptr=func();
printf("%d\n",*ptr);
printf("%u\n",ptr);

 getch();
 clrscr();
}
int *func(){
static int x=10;
 return(&x);
}