A program to explain FUNCTION with RETURN TYPE POINTERS
C Programming Language 109
- Write a program to explain FUNCTION with RETURN TYPE POINTERS
Program
#include <stdio.h>
int *fun()
{
int j = 15;
return (&j);
}
void main()
{
int *b;
b = fun();
printf("b = %d", *b);
printf("\n");
}
Result
The above code is probably incorrect. Please comment below how that can be fixed.
Last Updated on
Comments