Monthly Archives: June 2010

What is difference between static and extern? int varA ; // has external linkage (global), and static storage class static int varB ; // has static linkage (module local), and static storage class void funcA() { static varC ; // … Continue reading

Posted in open-source | Leave a comment

Using a Function Pointer

To call the function pointed to by a function pointer, you treat the function pointer as though it were the name of the function you wish to call. The act of calling it performs the dereference; there’s no need to … Continue reading

Posted in open-source | Leave a comment

malloc()

malloc() should be used with free() Syntax: #include Description: The function malloc() returns a pointer to a chunk of memory of size size, or NULL if there is an error. The memory pointed to will be on the heap, not … Continue reading

Posted in open-source | Leave a comment

Void Pointer

There are some examples in below It will help you to understand how void pointer works void use_int(void *r) { int a; a = * (int *) r; printf(“As an integer, you are %d years old.\n”, a); } void use_float(void … Continue reading

Posted in open-source | Leave a comment