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

1.Why do you call C is middle level language? 2.Why do you call C is userfriendly language.

2 Answers  


List the difference between a "copy constructor" and a "assignment operator"?

0 Answers   Accenture,


a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion

0 Answers   Mindteck,


#include<stdio.h> void main() { int =1; printf("%d%d%d",a++,++a,++a); }

3 Answers   VB,


writw a program to insert an element in the begning of a doubly linked list

1 Answers  






Do you know the difference between malloc() and calloc() function?

0 Answers  


Given an array of characters, how would you reverse it? How would you reverse it without using indexing in the array?

1 Answers   Microsoft,


how can i calculate mean,median,mode by using c program

1 Answers   HCL,


Can a pointer be null?

0 Answers  


Is the exit() function same as the return statement? Explain.

0 Answers   Agilent, ZS Associates,


Explain the difference between structs and unions in c?

0 Answers  


Bit swapping

2 Answers  


Categories