Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - C language: declare integer array a[ 10] and initialize it. Which of the following options is correct (write down the cause and final result of the error)?
C language: declare integer array a[ 10] and initialize it. Which of the following options is correct (write down the cause and final result of the error)?
Both C and D are correct, as follows:

A. = The right side of the sign can't be (), but {}, so it's wrong.

B {} cannot be empty, and there must be at least one number, so it is wrong.

C. correct; The 10 elements are all initialized to the integer 0.

D. correct; A[0] is initialized to integer 10, and a[ 1]~a[9] is initialized to integer 0.