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

Answer Posted / neeraj

#include<stdio.h>
#define string sum1()
int main(){

int k=string;
printf("%d",k);
getch();
return 0;

}
sum1()
{
int c=6;
int d=7;
return(c+d);
}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the sizeof () operator?

610


Explain what are the __date__ and __time__ preprocessor commands?

576


What is a macro?

643


What is a union?

595


Explain the advantages of using macro in c language?

566






Explain about the constants which help in debugging?

836


Describe the difference between = and == symbols in c programming?

763


What is function in c with example?

613


What is zero based addressing?

698


Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.

1754


Explain About fork()?

632


What is exit() function?

548


What are register variables in c?

560


Explain what is the benefit of using enum to declare a constant?

572


What are the different types of pointers used in c language?

604