Title | COP Final |
---|---|
Course | C Programming |
Institution | Valencia College |
Pages | 6 |
File Size | 158 KB |
File Type | |
Total Downloads | 111 |
Total Views | 180 |
This is the final exam in C Programming. It has all the questions and all of the correct answers....
Open-book Final Test (Online)
COP 1000
Question 1-10 (each 5 points) 1. Which of the following statement assigns the values stored in x to the first element on an array, ary?
a. ary = x; b. ary = x[0]; c. ary = x[1]; d. ary[0] = x; e. ary[1] = x; 2.
The following is a line in a program. //The program was written by Ginny Student It is an example of a
a. b. c. d.
Control structure Decision statement Comment Syntax error
3. If A = 10 and B = 3, determine if each of the following is true or false.
a. ( A + B ) > ( A * 2 – 3) False b. ( B - A * 2 ) > = ( A * 2 - B * 3 ) False 4. What is the output of the following code?
int N = 5 ; int A = 6; If (N >= 5) If ( N > 5 || A == 2 ) Printf(“%d”,A); Else Print(“%d”,N);
The output = 5
5. True or False: Each element in an array is referenced by its value.
False
6. What is the output given the code below is executed?
int B[10]; for (k=0;k...