What is pointer.

The Pointers in the c programming  is a variable that points to the address of another variable. The  Pointer in  the C language  is used to indicate the  memory randomly for example  at the run time. pointer variable strength  be comfortableness to the  any of  data type such as int for digits, float for decimal , char, double character, short etc.The computer science the programming language object, whose value refers to  another values stored elsewhere in  computer memory using its memory address. A pointer references the  location in the  memory, and achieving the value stored at that location is known as dereferencing  pointer. The Pointer Syntax:data type*var name for example int *p; char *p;.

KEY POINTS TO REMEMBER The POINTERS IN The C

  1.  Size of any pointer is 2 byte(8 bits).
  2.  The Pointer addition, multiplication,division are not allowed.
  3. If the  pointer in the C language  is assigned to NULL value then , it means it is indicating to nothing.
  4. 2  pointers can be deducted or reduced to know how much  elements are present between these two pointers.
  5. *  sign is used to achieve the value of the variable that  pointer is pointing to.
  6. & sign is used to get  address of the variable.
  7. C pointer is initialized to null, for example int *p = null.
  8. value of the null pointer is 0
  9. medium variable store the value where as pointer variable stores the address of the variable.

Types of pointers

There are different types of pointers in c language that are as follows.

  1. Huge Pointers.
  2. Near Pointer.
  3. Far Pointer.
  4. Complex Pointers.
  5. Generic Pointers.
  6. Wild Pointer.
  7. NULL Pointer.
  8. Dangling Pointer.

Huge pointer 

Huge pointer access whole the residence memory of the  RAM for example which can access all sixteenth  segments is known as a huge pointer. The huge pointer takes or reserves 32 bits or 4 byte in memory

Near Pointer

pointer which can indicate or point the  only 64 KB (kilo byte ) of  data piece  is known as near pointer. The pointer is near pointer does not  achieved  beyond  data piece  like graphics video memory or  text video memory, etc. The Size of the near pointer is 2 byte.

Far pointer

Far pointer can point the whole the residence memory of RAM, for example which can be access all sixteenth piece  is known as far pointer.The Size of far pointer is 4 byte (32 bit) of data one bit can store one character of data in one byte there are 8 bits which can store 8 character of data or alphabets

Complex Pointer

in the complex pointer the

[]: This operator behaves as array subscription operator.

*: This operator behaves as pointer operator, not as the multiplication operator.

(): This operator behaves as bracket operator or function operator.

The identifier is not the operator but identifier is the name of the pointer variable.

Data type is not an operator..The  data type  also include modifier.

The complex register include precedence  and Association.

Generic Pointers

The generic pointer is very useful when we are wanted to point any type of data the generic pointer is used to point the data.When the variable is initialized or declared  as being the  pointer to type (main functions of c language like ) void is known as the  generic pointer. Since we cannot have the  variable of type void, Generic  pointer will not point to the  any data and therefore cannot be dereferenced. It is currently  the  pointer though, to use it we just have to cast it to next  type  of the pointer first.

Wild Pointer

The Pointer in The C language  that has not  initialized till its first use is known as the wild pointer. the wild pointer indicates  to some random memory location in the c language where we want to point the data.

NULL Pointers

The Pointer which is declared  with the NULL value is known as the NULL pointer,Null pointer in the pointer is the pointer which is pointing nothing.The Null pointer points the base adress of any segment.The Null pointer is the micro constant which in prescribed in the following header files which are , stdio.h,etc.

Dangling Pointer

The Dangling pointers is awaking  when the  object is deleted , without changing  the value of the pointer, Therefore  the pointer still points to the memory location of the deleted  memory.

 

 

 

 

 


Yaqoob Gillani

I am yaqoob gillani electronics engineer and in this website i am going to show you very simple electronic circuits and also i am giving training about basic programming languages.

1 Comment

Muzammil Syed · December 13, 2018 at 2:22 am

Oh its amazing and easy to understand good work and also visit our site http://www.eeasynotes.com here all about medical simply defined and well explained.

Leave a Reply

Your email address will not be published. Required fields are marked *