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);
Answer Posted / 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 View All Answers
int i=3; this declaration tells the C compiler to a) reserve space in memory to hold the integer value b) associate the name i with this memory location c) store the value 3 at this location d) all the above
Explain null pointer.
Write a program to use switch statement.
What are static variables in c?
What does %c do in c?
Can we declare a function inside a function in c?
What is a good way to implement complex numbers in c?
Tell me what are bitwise shift operators?
Why is c known as a mother language?
How do I convert a string to all upper or lower case?
What is ctrl c called?
Explain how can I make sure that my program is the only one accessing a file?
Explain the use of #pragma exit?
Differentiate between static and dynamic modeling.
How can you increase the allowable number of simultaneously open files?