Skip to content
VUBuddy

CS201 Midterm Short Notes Set 2

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

CS201-Imtroduction to Programming-Short Notes

1. Describe History of C++?

The C++ programming language has a history going back to 1979, when Bjarne Stroustrup was doing work for his Ph.D. thesis. One of the languages Stroustrup had the opportunity to work with was a language called Simula, which as the name implies is a language primarily designed for simulations.

2. What is Dev. C++?

Bloodshed Dev-C++ is a full-featured Integrated Development Environment (IDE) for the C/C++ programming language. It uses Mingw port of GCC (GNU Compiler Collection) as it's compiler. Dev-C++ can also be used in combination with Cygwin or any other GCC based compiler.

3. Why Use Dev. C++ instead of C++ DOS IDE?

Dev-C++ is a free IDE for Windows that uses either MinGW or TDM-GCC as underlying compiler. Originally released by Bloodshed Software, but abandoned in 2006, it has recently been forked by Orwell, including a choice of more recent compilers.

4. What is #Include directive or Copy books or Header File?

Many programming languages and other computer files have a directive, often called include (as well as copy and import), that causes the contents of a second file to be inserted into the original file. These included files are called copybooks or header files.

5. Why we use curly braces in c?

Curly braces are used to group a set of statements. Often we use them along with loops and conditional statements in order to avoid confusion and to define a clear scope.

6. What is Main () function?

In C, the "main" function is treated the same as every function, it has a return type (and in some cases accepts inputs via parameters). The only difference is that the main function is "called" by the operating system when the user runs the program.

7. How many data types are in C?

Void, Int, Float, Character, String

8. How many types are for integers? Int or signed int unsigned int, short int or signed short int, long int or signed long int, unsigned long int

9. How many types are for Float data type?

Float, double, long double

10. What is mean by using namespace std; in C?

The built in C++ library routines are kept in the standard namespace. That includes stuff like cout, cin, string, vector, map, etc. Because these tools are used so commonly, it's popular to add "using namespace std" at the top of your source code so that you won't have to type the std:: prefix constantly.

11. Define the memory size of int variable types?

Type Size in Bytes Range

int or signed int 2 -32,768 to 32767

unsigned int 0 to 65535

short int or signed short int -128 to 127

long int or signed long int -2,147,483,648 to 2,147,483,647

unsigned long int 0 to 4,294,967,295

12. Define the memory size of Float Variable types?

Type Size(bytes) Range

Float 3.4E-38 to 3.4E+38

double 8 1.7E-308 to 1.7E+308

long double 3.4E-4932 to 1.1E+4932

13. How declare a variable?

The Syntax of Declare variable is data_type variable_name; where the data_type is the type of data which can hold a variable variable_name might be anything except the C directives and reserve words.

14. What is namespace?

Consider a situation, when we have two persons with the same name, Zara, in the same class. Whenever we need to differentiate them definitely we would have to use some additional information along with their name, like either the area if they live in different area or their mother or father name, etc. Same situation can arise in your C++ applications. For example, you might be writing some code that has a function called xyz() and there is another library available which is also having same function xyz(). Now the compiler has no way of knowing which version of xyz() function you are referring to within your code.A namespace is designed to overcome this difficulty and is used as additional information to differentiate similar functions, classes, variables etc. with the same name available in different libraries. Using namespace, you can define the context in which names are defined. In essence, a namespace defines a scope.

15. How define a namespace?

A namespace definition begins with the keyword namespace followed by the namespace name as follows

namespacenamespace_name {

// code declarations

To call the namespace-enabled version of either function or variable, prepend the namespace name as follows:

name::code; // code could be variable or function.

16. What are reserve words in C?

Reserve or Keywords are the words that C language use for his personal use a user cannot use reserve words as variable, function or class name. Example: IF, Else, Switch, For, While, Float etc.

17. What rules are for declaring a variable?

1. Every variable name should start with alphabets or underscore (_).

2. No spaces are allowed in variable declaration.

3. Except underscore (_) no other special symbol are allowed in the middle of the variable declaration.

4. Maximum length of variable is 8 characters depend on compiler and operation system.

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.