What is function pointer and where we will use it
Answers were Sorted based on User's Feedback
Answer / raghanna
A function pointer is a variable that stores the address of a function that can later be called through that function pointer. This is useful because functions encapsulate behavior. For instance, every time you need a particular behavior such as drawing a line, instead of writing out a bunch of code, all you need to do is call the function.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / bsreddi
A function pointer is a type of pointer in C, C++ and other
C-like programming languages. When dereferenced, a function
pointer invokes a function, passing it zero or more
arguments just like a normal function. In programming
languages like C, function pointers can be used to simplify
code, such as replacing large switch statements.
Is This Answer Correct ? | 5 Yes | 5 No |
What is the scope of an external variable in c?
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.
The code is::::: if(condition) Printf("Hello"); Else Printf("World"); What will be the condition in if in such a way that both Hello and world are printed in a single attempt?????? Single Attempt in the sense... It must first print "Hello" and it Must go to else part and print "World"..... No loops, Recursion are allowed........................
14 Answers HOV Services, IBM, Potty,
Explain About fork()?
Can you add pointers together? Why would you?
# define x=1+4; main() { int x; printf("%d%d",x/2,x/4); }
What is the difference between i++ and i+1 ?(in terms of memory)
What is a function in c?
suppose there are five integers write a program to find larger among them without using if- else
Who developed c language?
int *a[5] refers to
process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,