SlideShare a Scribd company logo
1 of 13
PROGRAMMING FUNDAMENTALS
BS SE/CS – 1st Semester
Credit Hours : 3-1
1
Department of Computer Science/IT
Sarhad University of Science and Information Technology, Peshawar
CS 116- PROGRAMMING FUNDAMENTALS
WEEK: 01
LECTURE: 01- LAB
LEVEL: BS SE/BS CS- 1ST SEMESTER
2
COURSE INSTRUCTOR: ADAM KHAN (adam.me@suit.edu.pk)
ACCESSED AT : portal.suit.edu.pk
Department of Computer Science/IT
Sarhad University of Science and Information Technology, Peshawar
Text Books:
1. Object-Oriented Programming using C++ by Tasleem Mustafa
2. The C Programming Language, 2nd Edition by Brian W.
Kernighan, Dennis M. Ritchie
Reference Books:
3. C How to Program, 7th Edition by Paul Deitel & Harvey Deitel
4. Problem Solving and Program Design in C++, 7th Edition by
Jeri R. Hanly & Elliot B. Koffman
5. Object-Oriented Programming in C++, 3rd Edition by Robert
Lafore
6. Computer Programming in C/C++ by Muhammad Tariq
Siddiqi, 2006.
7. Let us C++ by Yashavant Kanetkar
Recommended Books
3
Department of Computer Science/IT
Sarhad University of Science and Information Technology, Peshawar
Lecture Outlines
4
• Problem Solving Techniques
• Steps
• Solving Skills
• Problem solving approaches
• Problem solving steps in Programming
• Advantages
• Disadvantages
Department of Computer Science/IT
Sarhad University of Science and Information Technology, Peshawar
Learning Outcomes
5
Students will learn:
• Simple programs / Execution,
• Problems while run the programs, identify the Data, Inputs,
Process, Output.
Department of Computer Science/IT
Sarhad University of Science and Information Technology, Peshawar
PROGRAM TITLE :Write a program To display the name of
ALLAH.
#include<iostream.h>
#include<conio.h>
void main( )
{
cout<< “with the name of ALLAH”<<endl;
getch( );
}
6
Simple Program
Function:
In the above Example.
Only one function main ( ) is used.
With empty parenthesis.
Out Put:
Cout identifies actually an object.
Correspond to standered out put stream.
Stream is an abstraction that refers to a flow of data.
‘<<’ is called the Insertion or put to operator.
Preprocessor Directories:
Tell the compiler to insert another file into source file.
7
Simple Program
• Structure of a C ++ Program:
• Every C ++ program consists of one or more functions.
• Each function consists of a header and a block.
• Header consists of the function name followed by an optional
list of arguments enclosed in parenthesis.
• Header of main function is as follows—void main()
• Declaration part contains declaration of all the variables
• Both statement part and declaration part are enclosed in a
single pair of braces ({ }).
8
Simple Program
Phases of C++ Programs:
1. Edit
2. Preprocess
3. Compile
4. Link
5. Load & Execute
Loader
Primary
Memory
Program is created in
the editor and stored
on disk.
Preprocessor program
processes the code.
Loader puts program
in memory.
CPU takes each
instruction and
executes it, possibly
storing new data
values as the program
executes.
Compiler
Compiler creates
object code and stores
it on disk.
Linker links the object
code with the libraries,
creates a.out and
stores it on disk
Editor
Preprocessor
Linker
CPU
Primary
Memory
.
.
.
.
.
.
.
.
.
.
.
.
Disk
Disk
Disk
Disk
Disk
Phases of C++ Program
Compiler
Getting Started
Getting Started
Getting Started

More Related Content

Similar to Week 1 Lecture 1 LAB Weka lecture for machine learning

Principles of object oriented programing
Principles of object oriented programingPrinciples of object oriented programing
Principles of object oriented programing
Ahammed Alamin
 
Oosd lecture unit 4 ppt introduction part
Oosd lecture unit 4 ppt introduction partOosd lecture unit 4 ppt introduction part
Oosd lecture unit 4 ppt introduction part
ManuSingh669370
 
Introduction to Computer and Programing - Lab2
Introduction to Computer and Programing - Lab2Introduction to Computer and Programing - Lab2
Introduction to Computer and Programing - Lab2
hassaanciit
 

Similar to Week 1 Lecture 1 LAB Weka lecture for machine learning (20)

C++Basics2022.pptx
C++Basics2022.pptxC++Basics2022.pptx
C++Basics2022.pptx
 
Introduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).docIntroduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).doc
 
T2
T2T2
T2
 
Principles of object oriented programing
Principles of object oriented programingPrinciples of object oriented programing
Principles of object oriented programing
 
Oosd lecture unit 4 ppt introduction part
Oosd lecture unit 4 ppt introduction partOosd lecture unit 4 ppt introduction part
Oosd lecture unit 4 ppt introduction part
 
Basics of C Lecture 2[16097].pptx
Basics of C Lecture 2[16097].pptxBasics of C Lecture 2[16097].pptx
Basics of C Lecture 2[16097].pptx
 
Workshop1
Workshop1Workshop1
Workshop1
 
Introduction to C Language (By: Shujaat Abbas)
Introduction to C Language (By: Shujaat Abbas)Introduction to C Language (By: Shujaat Abbas)
Introduction to C Language (By: Shujaat Abbas)
 
Introduction to cpp language and all the required information relating to it
Introduction to cpp language and all the required information relating to itIntroduction to cpp language and all the required information relating to it
Introduction to cpp language and all the required information relating to it
 
Introduction-to-C-Part-1.pdf
Introduction-to-C-Part-1.pdfIntroduction-to-C-Part-1.pdf
Introduction-to-C-Part-1.pdf
 
Introduction to Computer and Programing - Lab2
Introduction to Computer and Programing - Lab2Introduction to Computer and Programing - Lab2
Introduction to Computer and Programing - Lab2
 
Labsheet1stud
Labsheet1studLabsheet1stud
Labsheet1stud
 
Cpa lecture (theory) 01_
Cpa lecture (theory) 01_Cpa lecture (theory) 01_
Cpa lecture (theory) 01_
 
Introduction to C Language
Introduction to C LanguageIntroduction to C Language
Introduction to C Language
 
Prog1-L1.pdf
Prog1-L1.pdfProg1-L1.pdf
Prog1-L1.pdf
 
Cp week _2.
Cp week _2.Cp week _2.
Cp week _2.
 
C++ Programming
C++ ProgrammingC++ Programming
C++ Programming
 
Lab 1.pptx
Lab 1.pptxLab 1.pptx
Lab 1.pptx
 
Object oriented programming 7 first steps in oop using c++
Object oriented programming 7 first steps in oop using  c++Object oriented programming 7 first steps in oop using  c++
Object oriented programming 7 first steps in oop using c++
 
C++ Programming
C++ ProgrammingC++ Programming
C++ Programming
 

More from JavedKhan524377 (7)

Linear Search for design and analysis of algorithm
Linear Search for design and analysis of algorithmLinear Search for design and analysis of algorithm
Linear Search for design and analysis of algorithm
 
Greedy algorithm for design and analysis
Greedy algorithm for design and analysisGreedy algorithm for design and analysis
Greedy algorithm for design and analysis
 
Binary Search Tree for design and analysis
Binary Search Tree for design and analysisBinary Search Tree for design and analysis
Binary Search Tree for design and analysis
 
Software Engineering Book for beginnerss
Software Engineering Book for beginnerssSoftware Engineering Book for beginnerss
Software Engineering Book for beginnerss
 
Software tetsing paper related to industry
Software tetsing paper related to industrySoftware tetsing paper related to industry
Software tetsing paper related to industry
 
lecture_for programming and computing basics
lecture_for programming and computing basicslecture_for programming and computing basics
lecture_for programming and computing basics
 
chapter_3_8 of software requirements engineering
chapter_3_8 of software requirements engineeringchapter_3_8 of software requirements engineering
chapter_3_8 of software requirements engineering
 

Recently uploaded

會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
中 央社
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
Peter Brusilovsky
 

Recently uploaded (20)

Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
 Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
 
How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17
 
IPL Online Quiz by Pragya; Question Set.
IPL Online Quiz by Pragya; Question Set.IPL Online Quiz by Pragya; Question Set.
IPL Online Quiz by Pragya; Question Set.
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptx
 
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
 
Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptx
 

Week 1 Lecture 1 LAB Weka lecture for machine learning

  • 1. PROGRAMMING FUNDAMENTALS BS SE/CS – 1st Semester Credit Hours : 3-1 1 Department of Computer Science/IT Sarhad University of Science and Information Technology, Peshawar
  • 2. CS 116- PROGRAMMING FUNDAMENTALS WEEK: 01 LECTURE: 01- LAB LEVEL: BS SE/BS CS- 1ST SEMESTER 2 COURSE INSTRUCTOR: ADAM KHAN (adam.me@suit.edu.pk) ACCESSED AT : portal.suit.edu.pk Department of Computer Science/IT Sarhad University of Science and Information Technology, Peshawar
  • 3. Text Books: 1. Object-Oriented Programming using C++ by Tasleem Mustafa 2. The C Programming Language, 2nd Edition by Brian W. Kernighan, Dennis M. Ritchie Reference Books: 3. C How to Program, 7th Edition by Paul Deitel & Harvey Deitel 4. Problem Solving and Program Design in C++, 7th Edition by Jeri R. Hanly & Elliot B. Koffman 5. Object-Oriented Programming in C++, 3rd Edition by Robert Lafore 6. Computer Programming in C/C++ by Muhammad Tariq Siddiqi, 2006. 7. Let us C++ by Yashavant Kanetkar Recommended Books 3 Department of Computer Science/IT Sarhad University of Science and Information Technology, Peshawar
  • 4. Lecture Outlines 4 • Problem Solving Techniques • Steps • Solving Skills • Problem solving approaches • Problem solving steps in Programming • Advantages • Disadvantages Department of Computer Science/IT Sarhad University of Science and Information Technology, Peshawar
  • 5. Learning Outcomes 5 Students will learn: • Simple programs / Execution, • Problems while run the programs, identify the Data, Inputs, Process, Output. Department of Computer Science/IT Sarhad University of Science and Information Technology, Peshawar
  • 6. PROGRAM TITLE :Write a program To display the name of ALLAH. #include<iostream.h> #include<conio.h> void main( ) { cout<< “with the name of ALLAH”<<endl; getch( ); } 6 Simple Program
  • 7. Function: In the above Example. Only one function main ( ) is used. With empty parenthesis. Out Put: Cout identifies actually an object. Correspond to standered out put stream. Stream is an abstraction that refers to a flow of data. ‘<<’ is called the Insertion or put to operator. Preprocessor Directories: Tell the compiler to insert another file into source file. 7 Simple Program
  • 8. • Structure of a C ++ Program: • Every C ++ program consists of one or more functions. • Each function consists of a header and a block. • Header consists of the function name followed by an optional list of arguments enclosed in parenthesis. • Header of main function is as follows—void main() • Declaration part contains declaration of all the variables • Both statement part and declaration part are enclosed in a single pair of braces ({ }). 8 Simple Program
  • 9. Phases of C++ Programs: 1. Edit 2. Preprocess 3. Compile 4. Link 5. Load & Execute Loader Primary Memory Program is created in the editor and stored on disk. Preprocessor program processes the code. Loader puts program in memory. CPU takes each instruction and executes it, possibly storing new data values as the program executes. Compiler Compiler creates object code and stores it on disk. Linker links the object code with the libraries, creates a.out and stores it on disk Editor Preprocessor Linker CPU Primary Memory . . . . . . . . . . . . Disk Disk Disk Disk Disk Phases of C++ Program

Editor's Notes

  1. 9