Skip to content
VUBuddy

CS201 Midterm Short Questions Updated

Introduction to Programming PDF 304 KBUpdated 23 Oct 2026
Midterm past paper CS201 Midterm Short Questions Updated PDF 304 KB
vubuddy.com
Type
Midterm past paper
Course
CS201 Introduction to Programming
Size
PDF 304 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 304 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 17. Download the file for all 17 pages.

MIDTERM (SHORT NOTES) · 2024 - 2025 · CS201 Short Questions · Lecture 01:

What is a program?

A precise sequence of steps to solve a particular problem.

Why is programming important?

It helps develop analytical and problem-solving skills.

What are some important programming skills?

Attention to detail, reusability, user interface design, and code commenting.

Why is attention to detail necessary in programming?

To ensure the program runs correctly and produces logical results.

What does reusability in programming mean?

Writing code that can be used again for similar tasks.

Why is user interface design important?

To make programs easy for users to understand and interact with.

What is the purpose of commenting code?

To describe the purpose and functionality of code for future reference.

Why are computers considered “stupid”?

Because they only do exactly what they're told, nothing more.

What is a program design recipe?

A structured method to analyze problems and build correct programs.

What is the role of testing in program development?

To evaluate, check, and refine the program for accuracy.

Lecture 2

What are the two main categories of software?

System software and application software.

What is the role of an operating system?

It manages hardware resources and provides services for software.

What is a device driver?

Software that allows the OS to communicate with hardware devices.

What is utility software?

Programs that perform specific system-related tasks like disk cleanup or defragmentation.

Give an example of application software. Accounting software or a GPS navigation app.

When and where was the C language developed?

In the 1970s at Bell Laboratories.

Who developed the C language?

Dennis Ritchie.

Why was C language created?

To write system software, including the UNIX operating system.

What is a text editor used for in programming?

To write and edit the source code.

What is the function of a compiler?

It translates the entire source code into machine language.

Lecture 3

What does #include <iostream.h> do?

It includes the input/output stream library in the program.

What is the role of main() in a program?

It marks the starting point of program execution.

What does cout do?

Displays output on the screen.

What is a variable?

A named memory location used to store data.

What is the assignment operator in C?

The = symbol.

What are the basic data types for whole numbers in C?

int, short, and long.

Which data types are used for real numbers?

float and double.

How is a character stored in C?

Using char type and enclosed in single quotes.

What is the % operator used for?

To get the remainder in integer division (modulus).

What is operator precedence?

The rules that determine the order of operations in expressions.

Lecture 4

What does cin do in C?

It takes input from the user.

How is user input stored in a variable?

Using cin >> variable;.

Why is int not ideal for storing average age with decimal?

Because it truncates the decimal part.

What is a common way to calculate an average in C?

Divide the total by the number of values.

How do you separate digits of a number in C?

Using modulus and division by 10.

What is the output of 1234 % 10?

What is the purpose of parentheses in expressions?

To force the order of evaluation.

Why is operator precedence important in expressions?

It affects the result of arithmetic calculations.

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.