what is the advantage of function pointer
Answer Posted / mahend
Function pointers are very important while implementing
Callback in C, for instance if Software has layered
archiecture, Function pointer are used bye upper layer to
register with below layer on certain conditions (i.e. some
event or interrupt)
Is This Answer Correct ? | 72 Yes | 7 No |
Post New Answer View All Answers
What is the symbol indicated the c-preprocessor?
why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above
How can I implement sets or arrays of bits?
what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
What is sizeof array in c?
When do we get logical errors?
Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given
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. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures
Explain the advantages and disadvantages of macros.
How are structure passing and returning implemented?
Why is extern used in c?
What is atoi and atof in c?
What would be an example of a structure analogous to structure c?
which type of aspect you want from the student.