0% found this document useful (0 votes)
23 views

Intro To Programming Notes

The document discusses different types of programming languages including procedural, functional, and object-oriented languages. It also discusses the differences between static and dynamic languages. Programming languages allow humans to instruct computers using structured code rather than binary. Memory is managed through the stack, which stores reference variables, and the heap, which stores the objects that variables point to. More than one reference can point to the same object in memory.

Uploaded by

R Mishra
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Intro To Programming Notes

The document discusses different types of programming languages including procedural, functional, and object-oriented languages. It also discusses the differences between static and dynamic languages. Programming languages allow humans to instruct computers using structured code rather than binary. Memory is managed through the stack, which stores reference variables, and the heap, which stores the objects that variables point to. More than one reference can point to the same object in memory.

Uploaded by

R Mishra
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

1

leCture – 1
Introduction to programming
Programming is a way to instruct the computer to perform various task.
Computers only understands Binary i.e., 0’s and 1’s.
Instructing computers in Binary i.e. 0’s and 1’s are very difficult for humans so,
to solve this issue we have programming languages.

Programming language: - It is a computer language used by programmers


to communicate with computers.

Types of Programming
Languages

Object-
Procedural Functional
Oriented
Procedural
 Specifies a series of well-structured steps and procedures to compose a
program.
 Contains a systematic order of statements functions and commands to
complete a task.

Functional
 Writing a program only in pure functions i.e., never modify variables but
only create new ones as an output.
 Used in a situation where we have to perform lots of different
operations on the same set of data like ML.

Community Classroom Kunal Kushwaha


2

Object Oriented
 Revolves around objects.
 Code + Data = objects
 Developed to make it easier to develop, debug, reuse and maintain
software.

“One programming language can be of all 3 types like- Python”


Java Follows procedural and object oriented both types

Static VS Dynamic Languages


Static Dynamic
Perform type checking at compile time Perform type checking at runtime
Errors will show at compile time Error might not show till programs run

Declare datatypes before use No need to declare datatype of


variables
More control Saves time in writing code but might
give error at runtime.

Memory Management
There are 2 types of memory Stack and Heap
When we declare a variable then the reference variable stored in stack
memory points to the object of that variable stored in heap memory.
For ex:- 𝑎 = 10
Here “a” is called reference variable, and “10” is the object of That reference
variable
 Reference variable are stored in stack memory.
 Heap memory stores the objects of reference variable.

Community Classroom Kunal Kushwaha


3

Points to remember:-
 More than one reference variable can points to the same object.
 If any changes made to the object of any reference variable that will be
reflected to all others variable pointing to same object.
 If there is an object without reference variable then object will be
destroyed by “Garbage Collection”

Community Classroom Kunal Kushwaha

You might also like