Skip to content
VUBuddy

CS201 Midterm Important Key Points Updated

Introduction to Programming PDF 239 KBUpdated 23 Oct 2026
Midterm past paper CS201 Midterm Important Key Points Updated PDF 239 KB
vubuddy.com
Type
Midterm past paper
Course
CS201 Introduction to Programming
Size
PDF 239 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 239 KB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from pages 1, 2, 3 of 7. Download the file for all 7 pages.

MIDTERM (SHORT NOTES) · 2024 - 2025 · CS201 Important Key points

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.

All CS201 files →
CS201 Introduction to Programming All CS201 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.