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
Explain high-order and low-order bytes.
Explain what is a 'locale'?
Explain bitwise shift operators?
What is the size of a union variable?
What is difference between arrays and pointers?
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
How do we declare variables in c?
How do you determine whether to use a stream function or a low-level function?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?
Why main function is special give two reasons?
Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80
What is the full form of getch?
Write a program to print fibonacci series using recursion?
Is c procedural or functional?
What do the functions atoi(), itoa() and gcvt() do?