How can I call a function, given its name as a string?
Answer Posted / hemant ware
A function can be called by object name and a function
name (sring ) with dot(.) operator.
e.g
class hi
{
void string()
{
cout<<"hello I am in string function";
}
};
void main()
{
hi h1;
h1.string();
}
| Is This Answer Correct ? | 12 Yes | 46 No |
Post New Answer View All Answers
Is register a keyword in c?
What is signed and unsigned?
Write a program which returns the first non repetitive character in the string?
write a program in c language to print your bio-data on the screen by using functions.
Which control loop is recommended if you have to execute set of statements for fixed number of times?
how logic is used
What does double pointer mean in c?
What is the use of getchar() function?
What is define directive?
What is the role of && operator in a program code?
How will you declare an array of three function pointers where each function receives two ints and returns a float?
find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }
What is fflush() function?
What is the difference between array and linked list in c?
Explain which function in c can be used to append a string to another string?