size of array is negative

size of array is negative.

Description


The compiler has detected a negative value in the array size field.

Causes


The value defining the array size is smaller than zero.

Example


size of array is negative
size of array is negative

Output


output: size of array is negative
output: size of array is negative

How to fix it ?


Replace the negative array size with a positive number.

syntax


<type>  <arrayName> [ <arraySize> ];

type : any valid C data type.

arraySize: integer constant greater than zero.

See also


Subscribe to our channel.

Leave a Reply

Your email address will not be published. Required fields are marked *