{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

exam2Practice

# exam2Practice - PIC 10A Second Practice Midterm NAME(Print...

This preview shows pages 1–4. Sign up to view the full content.

PIC 10A November 21, 2005 Second Practice Midterm NAME (Print!): Check one: Le (1a): O’Brien (1b): Problem Points Score 1 10 2 5 3 5 4 5 5 10 6 15 Total 50

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Problem 1 (10 points): Answer the following five true-false ques- tion. Circle TRUE if you think the statement is always true and FALSE if you think it’s ever false: (a) Elements of the array int array[SIZE] are indexed from 0 to SIZE. TRUE FALSE (b) By convention array[1][4] is the element of array in the first columns and fourth row. TRUE FALSE (c) To print out the entries of an array, most of the time you should use a loop. TRUE FALSE (d) The following function declaration is valid: int f(int a[5]); TRUE FALSE (e) Having both the following function declaration is valid: int f(int a, int b); double f(int a, int b); TRUE FALSE
3 Problem 2 (5 points): A complex number is a number of the form a + bi where i = - 1 and a and b are real numbers. The number a is called the real part and the number b is the imaginary part. Define a struct called Complex

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 7

exam2Practice - PIC 10A Second Practice Midterm NAME(Print...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online