0
Why is my respond invalid??
Which of the following statement is valid? (this is a challenge question exactly.) int *arr = new int ; (my respond) int *arr = new int [5]; (true answer) i think both of them are correct.
4 Respuestas
+ 3
Your answer is definitely correct.
The name given to a variable 'arr' doesn't implies at all it is an array..
I may call my array just like this
int aSingleValueOnly_nothingMore_ofTypeFloat[10 ] = {0};
And this is perfectly correct.
Obviously the name is a little misleading.
The quizzes are not always perfect..
0
You can see this question here.
https://www.sololearn.com/post/80568/?ref=app