C language

NULL pointer

It is the simplest pointer. The NULL pointer is a pointer which points to no where.. We can also use integer 0 in place of constant NULL. Int* x=NULL; The above statement creates a NULL pointer x. DEREFERENCING NULL As we know NULL pointer is actually a pointer which points to nowhere and hence we […]

C language

Pointer arithmetic

Addition of a number to pointer: Pointer+ number When we add some integer to the pointer then the address stored in the pointer is incremented by                                  number * sizeof (datatype of pointer) Assume space required for data types int & char are 2 & 1 bytesresp. And we represent a particular block of memory filled […]

C language

POINTERS Illustration

The pointer, as the name suggests, is something which is pointing to or directing to something. The pointer is used to store the address of another variable and the data type of the pointer is same as data type of variable it is pointing to. As the variable which points to other variable is called […]

C language

C pointer INTRODUCTION

Consider the following c statement: Int x=2; The above statement requests compiler to execute following steps: Reserve the required space (depending upon the data type and computer configuration) for the variable (randomly selected out of free memory pool) Assign i as name for that reserved space Store the integer value 2 in the reserved space […]