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 does the c in ctime mean?

0 Answers  


How can you increase the allowable number of simultaneously open files?

0 Answers  


Is array a primitive data type in c?

0 Answers  


Explain what are binary trees?

0 Answers  


Consider a language that does not have arrays but does have stacks as a data type.and PUSH POP..are all defined .Show how a one dimensional array can be implemented by using two stacks.

3 Answers   Google,






which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +

0 Answers  


Why do we use & in c?

0 Answers  


What is the difference between Printf(..) and sprint(...) ?

0 Answers   InterGraph,


2.main { int x,j,k; j=k=6;x=2; x=j*k; printf("%d", x);

9 Answers   HCL, Tech Mahindra,


Is c still used?

0 Answers  


why i join syntel?

23 Answers   ABC, Syntel, TCS,


Can a pointer point to null?

0 Answers  


Categories