In this section, you will learn how to create array of pointers.
A pointer is a variable that contains the memory location of another
variable. The values you assign to the pointers are memory addresses of other
variables (or other pointers). A running program gets a certain space in the
Syntax of declaring a pointer:
data_type_name * variable name
First of all, specify the data type of data stored in the location, which is to identified by the pointer. The asterisk tells the compiler that you are creating a pointer variable. Then specify the name of variable.
Here is the code:
Output will be displayed as:
Posted on: February 5, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles