Pointers In arrays||Dynamic Allocation||Dynamic allocation of objects||Dynamic Allocation of variables||Dynamically Allocated Arrays

π POINTERS IN ARRAYS π -by Aaditya Nayak Introduction: As we all know pointer is a variable that points towards an address of a entity. And you must have also seen the syntax to define a pointer variable pointing a single entity(variable or an object), which is : data_type * pointer_name = variable_or_object_name; Now in this blog we will see how to define a pointer pointing a group of elements or an array. Syntax And Application: Syntax: data_type * pointer_name = array_name; (here, you donβt need to add &) Explaination: We donβt add & here because in an array say: arr β arr represents pointer towards first element which is arr[0] in arr. Now, since arrays are contiguous blocks in memory lets consider a condition: Condition: (arr is an integer array containing n+1 elements) If first element arr[0] is present at an address x and size of integer in your system is 4bit so the next element will be present at address x+4 and so on, therefore nth elem...