I am new to prolog. I have learned that ,though it is a declarative language, prolog can be used as a general purpose programming language, just like C. So, whatever problems you can solve in C, you can solve in prolog as well, even though its run-time may not be as good. Since there are no pointers in prolog (as far as i know), I am wondering if i can write an equivalent program in prolog for the following code written in C :-
#include <stdio.h>
int main()
{
int a = 5;
int *p;
p = &a;
printf("The address of a is %d.", p);
return 0;
}