Top Topics in our Forum';
Interactive Parabola Grapher
Explore graph ,equation and the locus of a Parabola
Save graphs to your desktop!

A+    A−    B  
Algebra
Games
Geometry
Interactive
Trigonometry
Forum



Warning: include(/home/mathwa6/public_html/php_include/forum_left_side.php) [function.include]: failed to open stream: No such file or directory in /home/mathwa6/public_html/php_include/ontheLeft_moris.php on line 296

Warning: include() [function.include]: Failed opening '/home/mathwa6/public_html/php_include/forum_left_side.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mathwa6/public_html/php_include/ontheLeft_moris.php on line 296


AddThis Social Bookmark Button

AP Exam Practice

Questions on Arrays

Practice Problem 1)
You can assume that the myArray1 contains elements myArray1[0], myArray1[1], myArray1[2].... myArray1[m-1] where m = myArray1.length.
If myArray1 originally stored 0,4,22,0,0,4,0,11,11,0,0,0,4 what will myArray2 contain after executing teh cod segment below?
int counter=0;
for(int i=0;i < m ; i++){
if(myArray1[i] != 0 )
   {
   myArray1[counter]= myArray1[i];
   counter++;
   }
 int[]  myArray2;
 myArray2 = new int[counter];

for(int i=0;i< counter; i++)
   myArray2[i] = myArray1[i];

Answer