The statement "cout<<(&fun);" will treat (&fun) as a boolean value. The address of func is casted to bool (always evaluate as `true' ), then it is output as "1".
#include <iostream>
#include <conio.h>
using namespace std;
int fun();
int main()
{
int fun();
printf("%x\n",&fun);
cout<<(void*)(&fun);
getch();
return 0;
}
int fun()
{
return 0;
}