How can I call a function, given its name as a string?

Answer Posted / alice

You can't. You have to construct a table of two-field
structures, where the first field is the function name as a
string, and the second field is just the function name
(which the compiler will convert to its calling address).
Then search the table to get a string match in the first
field, and use the second field to call the function.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by operator precedence?

679


Explain how can I right-justify a string?

626


Explain the use of fflush() function?

628


In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.

2685


What is the use of the function in c?

599






What are the functions to open and close file in c language?

730


Who invented b language?

919


FILE PROGRAMMING

1780


a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above

686


Why doesnt the call scanf work?

676


C program to find all possible outcomes of a dice?

1856


What is default value of global variable in c?

564


How many types of arrays are there in c?

596


Are there namespaces in c?

570


How can you find the exact size of a data type in c?

602