what is a function pointer and how all to declare ,define
and implement it ???

Answer Posted / swagatika

function pointer is function returning a pointer
Example-

int *sum(int a, int b)
{
int x;
x= a+b;
return &x;
}

but the pointer to a function means a function interm of
pointer pointing to the another function.

int (*sum)(sum1);//pointer to a function

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 use of header?

813


How can I implement a delay, or time a users response, with sub-second resolution?

824


Explain b+ tree?

816


What is auto keyword in c?

943


a program that can input number of records and can view it again the record

1670






Why is #define used?

975


When should you use a type cast?

788


Tell me with an example the self-referential structure?

744


How the c program is executed?

845


Write a client and server program in C language using UDP, where client program interact with the Server as given below: i) The client begins by sending a request to send a string of 8 characters or series of 7 numbers, the server sends back a characters or numbers as per the request of the client. ii) In case of series of 7 numbers: The client sends a multiplication of numbers, to the server. iii) In case of a string of 8 characters: The client sends a reverse order of string to the server.. iv) Server will send an acknowledgment to the client after receiving the correct answer

4079


`write a program to display the recomended action depends on a color of trafic light using nested if statments

1862


Can you subtract pointers from each other? Why would you?

730


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.

2865


What is the translation phases used in c language?

815


What is the difference between array_name and &array_name?

960