Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is dynamic dispatch in c++?

1062


Explain b+ tree?

1067


What are # preprocessor operator in c?

1110


Here is a good puzzle: how do you write a program which produces its own source code as output?

1101


Why pointers are used?

1076


What is the right type to use for boolean values in c? Is there a standard type?

1015


Which header file should you include if you are to develop a function which can accept variable number of arguments?

1401


Explain what is the difference between a string and an array?

1168


What are the uses of a pointer?

1151


How can you increase the size of a dynamically allocated array?

1190


What are the advantages and disadvantages of a heap?

1211


What is the difference between union and anonymous union?

1305


Describe explain how arrays can be passed to a user defined function

1099


Why can’t constant values be used to define an array’s initial size?

1378


Which is better malloc or calloc?

1101