Computer Science Canada

High school exam in computer science, naming an array

Author:  poirier4 [ Fri Jun 20, 2008 11:45 pm ]
Post subject:  High school exam in computer science, naming an array

so i recently wrote my highschool exam in ics 3m1 (comp sciences) and we had to learn java. During this course we were introduced to arrays so on the extremely simple exam one of the questions was as fallows:

Create an array of type int and length 10.
we were able to name it whatever we wanted. so of course being a highschool student i seized the opertunity and wrote out the fallowing code:
code:
int[]penis=new int[10];


I created penis of length 10 Smile

Author:  wtd [ Sat Jun 21, 2008 1:17 am ]
Post subject:  RE:High school exam in computer science, naming an array

Incorrect answer!

The question did not ask you to assign the array to a variable.

Author:  michaelp [ Sat Jun 21, 2008 6:25 pm ]
Post subject:  RE:High school exam in computer science, naming an array

You must have got a kick out of that, didn't you? Very Happy


: