+ 3
What happens if you leave a part of an array blank? Example: int myArray [3] = { 0, 2, };
Example: int myArray [3] ={ 0, 2, };
4 ответов
+ 4
Assuming you refer to C++ (you didn't include C++ in tags) here's a previous discussion covering well on variable initialization topic:
(Edit)
C++ added into tags [Cool]
https://www.sololearn.com/Discuss/1128723/?ref=app
+ 1
This is a great question. You should have posted your results you got when you experimented with this on the Code PlayGround /IDE. I think the insight you gained could be helpful to others with similar questions.
0
Good idea to try in code playground. I did. The code still runs. The missing array variable gets defined as either random number or the location it is stored (not sure).
0
may be generate some error