§ — — Computer Programming 1
Your CP1 prelim covers the first three lessons of this subject — nothing more:
printf, scanf, format specifiers, escape sequences, conio.h functions, the anatomy of a C program| Question type | Usual share | What it really tests |
|---|---|---|
| Multiple choice | 30–40% | Definitions, history, symbols, "which is valid" |
| True or false | 15–20% | Rules with a twist (keywords, case sensitivity) |
| Evaluate the expression | 15–20% | Integer division, %, precedence, TRUE/FALSE |
| Predict the output | 15–20% | printf field widths, escape sequences, ++ |
| Flowchart / pseudocode | 10–15% | Draw or trace a simple algorithm |
If it is in a table in the lessons, it is fair game. Before the exam you should be able to write these from memory:
%c char, %d decimal integer, %f float, %lf double, %e scientific, %s string\n newline, \t tab, \\ backslash, \" double quote, \' single quote, \a bellchar 1 byte, short int 2 bytes (−32,768 to +32,767), int 4 bytes, float 4 bytes, double 8 bytes, void no value_; then letters, digits, _; no spaces or hyphens; case-sensitive; never a keyword! ++ -- then * / % then + - then < <= > >= then == != then && then || then ? : then assignment1.5 for 3/2 — integer division truncates to 1.& in scanf("%d", &num); on fill-in-the-blank items.integer a keyword — the keyword is int; integer is a valid identifier.%5d questions are graded space by space.| Day | Do this |
|---|---|
| 1 | Reread Lesson 1: Programming Concepts. Redraw the six flowchart symbols and the three control structures from memory. |
| 2 | Redo the Lesson 1 practice exercises on paper, then check against the worked solutions. |
| 3 | Reread Lesson 2: Introduction to C. Write the data-type table and precedence ladder from memory, twice. |
| 4 | Redo the Lesson 2 expression evaluations without looking. Every wrong answer: find which precedence rule you broke. |
| 5 | Reread Lesson 3: Input/Output and Program Structure. Hand-trace every printf example, counting spaces. |
| 6 | Take the free 15-item practice set below under time pressure (20 minutes, no notes). |
| 7 | Take a full mock exam under exam conditions, mark it with the answer key, and restudy only the items you missed. |
Light review the night before, sleep, and bring two pens. Kaya mo 'yan — the prelim is the most predictable exam of the semester.
Answer all 15 on paper before scrolling to the key. Target: 20 minutes, closed notes. Scope: Lessons 1–3 only.
_count b) qty_sold c) 2ndYear d) Rating11 / 2 = ______11 % 2 = ______double with scanf?
a) %d b) %f c) %lf d) %eprintf("%5d", 42);int and integer are both C keywords.scanf("%d", ___num);x = 10; y = x++; what are the values of y and x?'A'?2 + 3 * 4 % 5 = ______2ndYear — identifiers cannot start with a digit; the rest are all legal.int math.%lf — %f is for float; a double in scanf needs %lf. 42 — three spaces then 42: %5d right-justifies the number in a field of width 5.int is a keyword; integer is not (it is actually a valid identifier).& — scanf needs the address-of operator before a plain variable.\t — backslash-t; \n is newline, \a is the bell.x++ hands over the old value first, then increments.char — single quotes mean a single character; "A" in double quotes would be a string.* and % share the same level, left to right: 3*4=12, 12%5=2, then 2+2=4.Scored 12 or better? You are on track. Below that, redo the lesson the missed items came from before trying a full mock. The four full 30-item mock exams below — two prelim and two final, each with a fully explained answer key — are included when you unlock this subject.
ProReviewer — locked
Drills, code labs, and full solutions.
ProReviewer — locked
Drills, code labs, and full solutions.
ProReviewer — locked
Drills, code labs, and full solutions.
ProReviewer — locked
Drills, code labs, and full solutions.
ProReviewer — locked
Drills, code labs, and full solutions.
ProReviewer — locked
Drills, code labs, and full solutions.
ProReviewer — locked
Drills, code labs, and full solutions.
ProReviewer — locked
Drills, code labs, and full solutions.
Done with this module? Track it — your progress shows on the subject list.
You've finished this subject