Important Notice:

Course Content
Building IoT Applications (Chapter-4) M4-R5.1
About Lesson

POINTERS:

          Pointer is a variable that stores/hold address of another variable of same data type/ t is also known as locator or indicator that points to an address of a value. A pointer is a derived data type in C

Declaration of Pointer

data_type* pointer_variable_name;

int* p;

Initialization of Pointer variable

int a = 10 ;

int *ptr ; //pointer declaration

ptr = &a ; //pointer initialization

or,

int *ptr = &a ; //initialization and declaration together

Note:Pointer variable always points to same type of data.

float a;

int *ptr;

ptr = &a; //ERROR, type mismatch

error: Content is protected !!