CS201 Midterm Important Key Points Updated
- Type
- Midterm past paper
- Course
- CS201 Introduction to Programming
- Size
- PDF 239 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extension for 30 a day.
Preview text
Text from pages 1, 2, 3 of 7. Download the file for all 7 pages.
Lecture 1 – What Is Programming?
A program is a precise sequence of steps to solve a problem. Programming builds critical reading, analytical thinking, and creative synthesis. Essential skills: attention to detail, commenting, designing for reusability & UI, understanding that computers follow instructions literally. Follow a design recipe: analyze the problem, abstract with examples, write precise specs, test and refine.
Lecture 2 – Software & Development Environment
Software categories: system (OS, drivers, utilities) vs. application software. History of C: evolved from BCPL and B, standardized by ANSI/ISO in 1989. Development tools: text editor →preprocessor →compiler →linker →loader → debugger. Utilities: compression, defragmentation—manage disk performance.
Lecture 3 – First C Programs & Basics
Structure: #include <iostream.h>, main(), { }, statements ending in ;. I/O streams: cout << for output, cin >> for input. Variables & data types: int, short, long, float, double, char. Assignment = vs. comparison ==; arithmetic operators + – * / %; operator precedence and use of parentheses.
Lecture 4 – Expressions & Sample Programs
Build programs step by step: declare variables, prompt input, compute, display. Integer division truncates decimals; use floats for real‐number results. Use clear prompts (cout) and cin for robust user interaction. Practice writing and tracing expressions, enforce evaluation order with parentheses.
Lecture 5 – Decision Making (if)
if (condition) executes its block when true; braces {} group multiple statements. Relational operators: > < >= <= == !=. Logical operators introduced later; use flowcharts (diamond symbol) to design decision logic.
Lecture 6 – if/else & Logical Operators
Extend decisions with else and else if for two‐way or multi‐way branching. Logical operators: AND &&, OR ||, NOT !; combine multiple conditions. Beware using single = instead of == in conditions—leads to logical bugs.
Lecture 7 – for Loops
for (init; condition; update) is ideal when the iteration count is known. Order: initialization →test →body →update →repeat. Common pattern: for (int i = 0; i < N; i++) { … }.
Lecture 8 – while & do-while Loops
while (cond) checks before entry; may execute zero times. do { … } while (cond); checks after body—executes at least once. Use break to exit loops early, continue to skip to the next iteration.
Lecture 9 – Functions & Modular Design
Divide code into reusable functions: declaration (signature) vs. definition (body). All programs start with main(), which may call other functions. Top‐down design: break complex tasks into subtasks, implement and test each.
Lecture 10 – Header Files & Scope
#include pulls in declarations (e.g., <iostream.h>). Scopes: global (file scope), function‐level, block‐level—minimize globals. Parameter passing: default is call by value (copies), optional call by reference (addresses).
Lecture 11 – Arrays & Linear Search
Arrays: contiguous memory, zero‐based indexing. Declaration: int a[10];; initialization: = {0} or loop‐based. Copy arrays via loops; search linearly with for (i = 0; i < n; i++) if(a[i]==key) …. Use const to protect arrays from modification.
Related CS201 files
All CS201 files →- CS201 Midterm Solved MCQs with References Set 2 Midterm DOC 45 KB
- CS201 Midterm Short Questions Updated Midterm PDF 304 KB
- CS201 Midterm Solved Subjective with References Midterm PDF 1.1 MB
- CS201 Midterm Short Notes Midterm PDF 171 KB
- CS201 Highlighted Handouts Set 3 Highlighted PDF 3.3 MB
- CS201 Lecture 9 Quiz DOCX 17 KB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.