Day#47 'C' Coding Challenge

Day#47 'C' Coding Challenge

What is double pointer in C Programming?

Double pointer is a pointer to a pointer. Lets us explain it using below example:

int a = 10;  
int *ptr_1;
ptr_1 = &a;
int **ptr_2;
ptr_2 = &ptr_1;

The above code declared a variable 'a' and 'ptr_1' is holding the address of 'a'. 'ptr_2' is another pointer which holds the address of 'ptr_1'. 'ptr_2' is a double pointer as it points to the address of another pointer.

Access the video on this topic from below link:

Post a Comment

2 Comments

  1. In Line 3 you probably mean "ptr_1" instead of "ptr"

    ReplyDelete
    Replies
    1. You are absolutely right.. Thanks for pointing out.. common overlook errors in programming

      Delete