Major Field Test in Computer Science
Sample Questions
The following questions illustrate the range of the test in terms of the abilities measured,
the disciplines covered, and the difficulty of the questions posed. They should not,
however, be considered representative of the entire scope of the test in either content or
difficulty. The notation pages and the answer key follow the questions.
x
int i 1
int j 1
while ( i < 10 )
j j * i
i i + 1
if ( i == x )
break
end if
end while
while
( i == 10 ) ( i == x )
x > 10 i == 10
j == 6 x == 4