What happens when you attempt to compile and run the following code?
#include
using namespace std;
void fun(int*);
int main()
{
int *x;
int i=2;
x=&i;
fun(x);
cout<
return 0;
}
void fun(int *i)
*i = *i * *i;
It prints: 2
It prints: 4
It prints: 0
It prints: 1
Submit