Home > Back-end >  C language structure
C language structure

Time:09-15

Structure member is the number in the brackets at the back of the members in the definition of length? When need to define the length when don't need? Small white o C guidance!!!!!!

CodePudding user response:

The brackets in the structure is to define an array, why use arrays, depends on the actual situation, such as the name [20]. If you define char name; What do you call a byte to hold a name, and the name is a string, rather than a single character, student id is the same, but for the result, general use int or float type, you can define a variable, not an array, (of course, want to use an array may define multiple results).

CodePudding user response:

reference 1/f, confident boy reply:
the brackets in the structure is to define an array, why use arrays, depends on the actual situation, such as the name [20]. If you define char name; What do you call a byte to hold a name, and the name is a string, rather than a single character, student id is the same, but for the result, general use int or float type, you can define a variable, not an array, (of course, want to use an array may define multiple grades),

Mr Obama thanks
  • Related