Diffrence between generic pointer and pointer in c language?

 Dont Buy Textbooks. Rent 'EM Save 60-80%



1. Generic pointer is nothing but void*.

2. A generic pointer/void* can be easily type casted to the desired datatype.

3. Main differenc between the generic pointer and pointer of specific datatype: The void* is capable of pointing to the variable of any datatype whereas pointer of specific datatype say int* can point only to the variable of type int.

4. Generic pointer is also used for taking the address of the variable alone.

4. Whenever you are using void*, typecasting is required to perform the operation on the content that void* points to.

5. Be careful when you are doing any arithmetic operation with void*.



More Related Questions and Answers ...
  • What is Pointer in 'C'?
  • What is a pointer in C language?
  • What is v pointer in c++?
  • How does a pointer work? (c programs)?
  • What is smart pointer in c language?
  • What is meant by pointer in c programming?
  • What is a static pointer in C?
  • How do you declare a pointer in c and what ar..
  • Can anyone explain about "this" poi..
  • What are the basic operation of a pointer in ..
  • Is it safe to free a NULL pointer in C?
  • What's the use for a double/triple p..
  • Please give me atleast 1 example of a pointer..
  • How can I use list array with no pointer in c..
  • Finding highest value in array using pointer ..
  • What is the difference between Call by refere..
  • Question with malloc and pointer function in ..
  • I want a c program using pointer,array,functi..
  • Write a simple C/C++ program which defines an..

  • The information post by website user , we not guarantee correctness.

    

    Dental Treatment Skin Whitening Skin Problems Skin Rashes Shoes