I am new at programming and even I can tell you that this code is seriously wrong. Also if you can't figure it out, then don't take the job as this is probably the minimum requirement for the job... Just my opinion on this. Lemme try tearing this up.
Code:
#include<stdio.h>
void fun(.........);/*fill the blanks in this line*/
main()
{
int *p=1000; <-- you declare an address but no variable to take it. You cant imagine an address out of nowhere.
This is what it is saying, "int (address?) = (undefined)pointer -> 1000;"
fun(&p);
printf("%d\n",*(int*)p);
}
void fun(int *q) <--- why use q now when you could redefine p?
{
*q=2000;
}
}
I can't guarantee that what I noted was correct, but I think it is in the step in the right direction. Dont take the job mate if you can't do this minimum problem.