PF - WK 1 - Introduction
PF - WK 1 - Introduction
Programming Fundamentals
Fall 2023
Course conducted by
Dr. Mohammad Imran
Assistant Professor
Dept. of Cyber Security
CS111 – Programming Fundamentals 2
Motivation
▪ Why are you pursuing this degree?
• Better job/career prospects
• Social obligation!
▪ Why are you studying this course?
• If you want to secure a computer system, you should know how a
computer works
• Attackers use software to gain unauthorized access to computers, so
you need to know how software is developed
CS111 – Programming Fundamentals 3
Course Description
▪ This course is aimed at familiarizing the students with programming
concepts, so that they can develop computer programs to solve real
world computing problems
▪ The students will learn the syntax of C++ programming language for
implementing concepts learned in this course
CS111 – Programming Fundamentals 4
Course Outline
▪ Data types, constants and variables
▪ Control structures
• Conditional execution (if-else, switch)
• Repetition (for and while loops)
▪ Arrays and character strings
▪ Pointers
▪ Structures
▪ Functions
▪ File handling
CS111 – Programming Fundamentals 6
Reference Material
▪ Books
• Starting Out with C++ from Control Structures to Objects by Tony Gaddis
(8th Edition)
• C++ How to Program by Deitel & Deitel (10th Edition)
• Object Oriented Programming in C++ by Robert Lafore (4th Edition)
▪ The Web
• Only limited by your own capacity to search and learn!
• w3schools.com is a good resource for programming stuff
CS111 – Programming Fundamentals 9
Contact Details
▪ 3rd Floor Faculty Offices
• Consultation hours will be communicated later
▪ Ext. 684
▪ [email protected]
▪ 0321-5015699 – Feel free to WhatsApp, SMS, Call
Week 1
CS111 – Programming Fundamentals 13
What is a computer?
▪ “Electronic device for storing and processing data, making
calculations, or controlling machinery.” (The Pocket Oxford Dictionary)
Linking
YourCode
.exe
The output program
CS111 – Programming Fundamentals 25
Compiling
▪ Compiling is the process of converting a program in high level
language to machine code
▪ It is a multi-step process
• Parsing the text – separating words and seeing what they represent
• Syntax-checking – making sure that the code follows language rules
• Translation into machine code
▪ The output of this process is an object file
• This file is in machine code but not actually executable
• Executable: A program that can be run on a computer
CS111 – Programming Fundamentals 30
Linking
▪ Almost all computer programs use some other programs that have
been already developed and tested by others
• Code reuse
• Benefit?
Saving of time and effort
▪ Linking is the process of linking the object files of other programs
with your program
▪ The output is an executable file