Top

Discussion

What will be the output of the program ?

#include

void fun(void *p);
int i;

int main()
{
    void *vptr;
    vptr = &i;
    fun(vptr);
    return 0;
}
void fun(void *p)
{
    int **q;
    q = (int**)&p;
    printf("%d\n", **q);
}

 

  • A.Error: cannot convert from void** to int**
  • B.Garbage value
  • C.No output

Answer:

No comment is present. Be the first to comment.
Loading…

Post your comment