TTU CS 1412 FINAL EXAM – COMPUTER SCIENCE STUDY GUIDE,
PRACTICE QUESTIONS & REVIEW 2026/2027
"\n" is a tab operator T/F - ✔✔False
Will the value of c be 6 T/F?
a = 5;
c = (B - a + 2) - (a = 1); - ✔✔False
for loop first performs the operation and then tests the condition T/F - ✔✔False
The output of printf("\\"); will be \ T/F - ✔✔True
If
int a[15] = {[2] = 29, [9] = 7, [14] = 48};
The value of a[5] will be 29 T/F - ✔✔False
In C, m[i, j] is the same as m[i][j] T/F - ✔✔False
For a multidimensional array, if you omit the inner braces, like the code below, it will show an error T/F.
int m[3][4] = {1, 1, 1, 1,
0, 1, 0, 1,
0, 1, 0, 1}. - ✔✔False
Changing one member of a union alters any value previously stored in any of the other members T/F -
✔✔False
To declare an enumeration, you have to use a pseudonym keyword T/F - ✔✔False
What will be the output of this C code snippet?
void main () {
int f1 = 0.1;
if (f1 == 0.1)
printf("equal\n");
else
printf("not equal\n"); - ✔✔not equal
What are the three advantages we discussed in class about dividing a large program into modules? -
✔✔Abstraction, Reusability, Maintainability
In a well designed program, modules should have two properties. What are they? - ✔✔High cohesion,
low coupling
The realloc function allows us to change an array in what way(s)? - ✔✔"grow" or "shrink" as needed
PRACTICE QUESTIONS & REVIEW 2026/2027
"\n" is a tab operator T/F - ✔✔False
Will the value of c be 6 T/F?
a = 5;
c = (B - a + 2) - (a = 1); - ✔✔False
for loop first performs the operation and then tests the condition T/F - ✔✔False
The output of printf("\\"); will be \ T/F - ✔✔True
If
int a[15] = {[2] = 29, [9] = 7, [14] = 48};
The value of a[5] will be 29 T/F - ✔✔False
In C, m[i, j] is the same as m[i][j] T/F - ✔✔False
For a multidimensional array, if you omit the inner braces, like the code below, it will show an error T/F.
int m[3][4] = {1, 1, 1, 1,
0, 1, 0, 1,
0, 1, 0, 1}. - ✔✔False
Changing one member of a union alters any value previously stored in any of the other members T/F -
✔✔False
To declare an enumeration, you have to use a pseudonym keyword T/F - ✔✔False
What will be the output of this C code snippet?
void main () {
int f1 = 0.1;
if (f1 == 0.1)
printf("equal\n");
else
printf("not equal\n"); - ✔✔not equal
What are the three advantages we discussed in class about dividing a large program into modules? -
✔✔Abstraction, Reusability, Maintainability
In a well designed program, modules should have two properties. What are they? - ✔✔High cohesion,
low coupling
The realloc function allows us to change an array in what way(s)? - ✔✔"grow" or "shrink" as needed