Suppose I want to write a function that takes a generic
pointer as an argument and I want to simulate passing it by
reference. Can I give the formal parameter type void **, and
do something like this?

void f(void **);
double *dp;
f((void **)&dp);



Suppose I want to write a function that takes a generic pointer as an argument and I want to simula..

Answer / shruti_kamthe

why **??

function that takes generic pointer argument.
declare pointer as void *

void f(void *);

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Interview Questions

WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c file management?

28 Answers   3D PLM, Code Studio, Deltech, IBM,


What does *p++ do? What does it point to?

0 Answers  


How we add our function in liabrary as liabrary function. Exp. we want use our int factorical(int); function as int pow(int,int); function working in math header file.

1 Answers  


What is sizeof in c?

0 Answers  


What is a class?

3 Answers  


What are local static variables?

0 Answers  


What is nested structure with example?

0 Answers  


cavium networks written test pattern ..

0 Answers   Cavium Networks,


write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34

0 Answers  


What is the difference between typeof(foo) and myFoo.GetType()?

2 Answers   Synergy,


What will be printed as the result of the operation below: #include<..> int x; int modifyvalue() { return(x+=10); } int changevalue(int x) { return(x+=1); } void main() { int x=10; x++; changevalue(x); x++; modifyvalue(); printf("First output:%d\n",x); x++; changevalue(x); printf("Second output:%d\n",x); modifyvalue(); printf("Third output:%d\n",x); }

2 Answers  


palindrome for strings and numbers----Can anybody do the prog?

6 Answers   CTS, TCS, Vipro Lifescience Pvt,


Categories