Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What are the definition and assignment of arrays in C language?
What are the definition and assignment of arrays in C language?

The definition of C language array is:

char c[6]={'c', ' h ', 'i', 'n', 'a'?, '\ 0' };

The definition assignment of integer array is:

int a[5]={1,2,3,4,5};

int a[5];

? for(int i=0;i<5;i++)

a[i]=i;

Define float array And assign value:

float b[10]={1.1,2.2,3.3,4.4,5.5,6.6,7.7,8.8,9.9,0.0}

Extended information:

Declare a fixed-size array:

There are three ways to declare a fixed-size array. Which method to use depends on the valid range of the array:

1. Establish For public arrays, use the Public statement in the declaration section of the module to declare the array.

2. Create a module-level array and declare the array with a Private statement in the declaration section of the module.

3. Create a local array and use the Private statement to declare the array during the process.