Computer Science, asked by manunekkanti123, 2 months ago

Negative elements can be placed inside the array?​

Answers

Answered by BrainlyFlash156
11

\huge \mathcal{ \fcolorbox{cyan}{black}{ \green{Solution:-}}}

No, you cannot use a negative integer as size, the size of an array represents the number of elements in it, –ve number of elements in an array makes no sense.

Answered by Agastya0606
0

Yes, negative elements can be placed inside the array.

  • Yes, we can store negative elements in an array. According to the definition of an array, an array simply defines we need to have a homogeneous data type.
  • The only restriction on the elements to be stored in an array is that all the elements should be of the same type, that is they all should be either integer, float, or any type, but all the elements should be homogeneous.

#SPJ3

Similar questions