what is a function pointer and how all to declare ,define
and implement it ???
Answer Posted / mathiyazhagan
A function can itself stored in a memory address.By calling
the address ,instead of function name,we can invoke
function.
Eg.:
#include <stdio.h>
void sum(int,int);
{
void (*fp)(); //() denotes pointer to a function
fp=sum(); // no need & .reason : same of array
fp(10,20); //invoking function
}
void sum(int x,int y)
{
printf("sum of x%d and %d is =%d",x,y,x+y);
}
| Is This Answer Correct ? | 1 Yes | 5 No |
Post New Answer View All Answers
Explain continue keyword in c
What are the different types of constants?
When was c language developed?
about c language
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
How many data structures are there in c?
What is volatile variable in c with example?
write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list
How can a program be made to print the line number where an error occurs?
Are there any problems with performing mathematical operations on different variable types?
what are the facialities provided by you after the selection of the student.
p*=(++q)++*--p when p=q=1 while(q<=6)
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a
Explain the difference between null pointer and void pointer.
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.