Look at some sample quiz questions:
==================================================
/* What does the code below output? */
void TryAssign (int & anInt, int anInt2)
{
anInt = 14 ;
anInt2 = 78712 ;
}
int main()
{
int num = 30;
int trans = 95380 ;
TryAssign(num, trans);
cout << "Num is: " << num << endl ;
cout << "Trans is: " << trans << endl ;
return 0;
}
==================================================
/* What does this code output? */
int numbers[7], i, sum ;
for (i=0; i<7; i++) numbers[i]=i;
sum =0 ;
for (i=0; i<7; i++) sum += numbers[i];
for (i=0; i<7; i++) cout << numbers[i] << " ";
cout << endl << sum << endl << endl ;
==================================================
Given the declaration:
int count[26], sum = 0 ;
write a C++ for-loop that sets the variable "sum" equal to
the number of zero's in the array "count."
==================================================