What Is Pointer?

A Pointer is a derive data type in C, which is built from the fundamental data type in c a Pointer is a variable which stores always an address of another variable.




Advantage of Pointer:

By using Pointer we can use access a variable which is defined outside the function

By using Pointer, we can handle we can handle the database like graph, trees and linked list more efficiently.

Pointer can increase the execution speed.

In Pointer, we using two operators

& address of operator
 * object \value of address \indirection operator \deference operator




  1. void main()
  2. {
  3.    int i;
  4.     int* ptr;
  5.    ptr=&i;
  6. }

    Here i is a variable of type integer.ptr is a variable of type int* and it is an address type.ptr can hold an address of an integer variable.

    0 comments:

    Post a Comment

    Don't Forget to comment

    About Me

    My photo

    HI i am mohammed  a Embedded Software Developer ,SEO specialist,Electronic engineer   Read more

    ads