Senin, 19 Desember 2016

How to use Pointers in Arrays (C programming language)

When an array is declared in a program, the compiler allocates a base address and sufficient amount of storage to contain all the elements of the array in contiguous (continuous) memory locations. The base address is the location of the first element (index 0) of the array. The compiler also defines the array name as a constant pointer to the first element. Suppose array x is declared as shown below: 1 int x = {1,2,3,4,5}; Suppose the array is allocated memory as shown below:. The name x is defined as a constant pointer pointing to the first element, xand therefore

The post How to use Pointers in Arrays (C programming language) appeared first on Coding Security.


How to use Pointers in Arrays (C programming language)
read more

Tidak ada komentar:

Posting Komentar