free c programming course
Thursday, 3 September 2009
Function returning pointer to void i.e. generic pointer in c
void *srkhan();void main(){ int *ptr; ptr=srkhan(); clrscr(); printf("%d",*ptr); getch();}void * srkhan(){ static int temp=9; void *p=&temp; return p;}Output: 9
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment