Initializing Arrays
The arrays can be initialized by giving the initial values in a list and enclosed in curly brackets, which is placed after the equal sign which is put after the declaration of the array.
For example:
Int age[5] = {12, 13, 11, 25, 8};
There is also another way of initializing all the elements of the array to be zero.
For example:
Int age[5] = {0};
IMPORTANT LINKS HEAR:
Array | Types of Arrays | Passing Array to Functions | Declaration of Array | Initializing Arrays | Difference between an Array and an Ordinary Variable
LINKS:
Array | Types of Arrays | Declaration of Array | Initializing Arrays | Difference between an Array and an Ordinary Variable | String | Declaring a string | Initializing a string | Different functions used to Input of Strings Data | Different Functions used to Output of strings data | Pointer | There are number of reasons for using pointers | Difference between An Array and Pointer | Storage Class | In C, there are four types of storage classes as below | Algorithm | Characteristics/Qualities of a good Algorithm | Flow Chart
ALL LINKS HEAR:
Array | Types of Arrays | Passing Array to Functions | Declaration of Array | Initializing Arrays | Difference between an Array and an Ordinary Variable
LINKS:
Array | Types of Arrays | Declaration of Array | Initializing Arrays | Difference between an Array and an Ordinary Variable | String | Declaring a string | Initializing a string | Different functions used to Input of Strings Data | Different Functions used to Output of strings data | Pointer | There are number of reasons for using pointers | Difference between An Array and Pointer | Storage Class | In C, there are four types of storage classes as below | Algorithm | Characteristics/Qualities of a good Algorithm | Flow Chart
ALL LINKS HEAR:
No comments