on
Post
- Get link
- X
- Other Apps
int **var;
#include <stdio.h> int main () { int var; int *ptr; int **pptr; var = 3000; /* take the address of var */ ptr = &var; /* take the address of ptr using address of operator & */ pptr = &ptr; /* take the value using pptr */ printf("Value of var = %d\n", var ); printf("Value available at *ptr = %d\n", *ptr ); printf("Value available at **pptr = %d\n", **pptr); return 0; }
Element[0] = 100 Element[1] = 101 Element[2] = 102 Element[3] = 103 Element[4] = 104 Element[5] = 105 Element[6] = 106 Element[7] = 107 Element[8] = 108 Element[9] = 109
Sr.No. | Concept & Description |
---|---|
1 | Multi-dimensional arrays
C supports multidimensional arrays. The simplest form of the multidimensional array is the two-dimensional array.
|
2 | Passing arrays to functions
You can pass to the function a pointer to an array by specifying the array's name without an index.
|
3 | Return array from a function
C allows a function to return an array.
|
4 | Pointer to an array
You can generate a pointer to the first element of an array by simply specifying the array name, without any index.
|
Comments
Post a Comment