Multiple choice

Is the following definition valid? int array1={34,69};

  1. Yes

  2. No

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

This array definition is invalid because it's missing the array size in the declaration. In C/C++, when initializing an array, you must specify its size either explicitly (int array1[2]={34,69}) or implicitly through initialization (int array1[]={34,69}). The syntax int array1={34,69} is not valid for array declaration.