CS201 Final Term Notes by Almas Afzal
- Type
- Final term past paper
- Course
- CS201 Introduction to Programming
- Size
- PDF 293 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 15. Download the file for all 15 pages.
Also called Macros. Macros is a special name, which is substituted in the code by its definition and, as a result we get an expand code.
With the define directive , we can define PI as:
#define Pi 3.1415926
Jab macros ko use Kiya jata hai to is mein assignment operator Nahin lagaya jata,, without Assignment operator, value assign ki jati hai
- #if
Macros are classified into two categories. First: The first type of macros can be written using #define. The value of PI can be defined as:
#define Pi 3.1415926
Second: The second type of macros takes arguments. It is also called a “parameterized macros”.
Memory will be allocated during the execution of program.
Static: Static Allocation is also called “Compile time allocation”. This memory allocation is defined at the time when we write the program while exacting knowing how much memory is required. Static memory stored in “Stack”. Dynamic: Whenever we don’t know in advance how much memory space would be required , it is better to use dynamic memory allocation. Dynamic memory stored in “heap”.
2.Void Pointer:
Jab b ap void pointer ko use Karen gy to sab say pehly apko uski “casting” krni pryge....
Casting: Cast means the conversion of “void” into a type of pointer that can be used for native data type like int, char, float etc.....
Related CS201 files
All CS201 files →- CS201 Final Term MCQs by VUBuddy Final term PDF 3.5 MB
- CS201 Final Term Short Notes Set 2 Final term PDF 231 KB
- CS201 Final Term Current Paper 2020 by VUBuddy Final term PDF 480 KB
- CS201 Final Term Current Paper 2020 Set 2 by VUBuddy Final term PDF 453 KB
- CS201 Highlighted Handouts Set 3 by VU Topper RM Highlighted PDF 5.1 MB
- CS201 Grand Quiz 2 by Lucky Quiz PDF 3.4 MB
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.