SlideShare a Scribd company logo
1 of 14
Download to read offline
CSE-1121 (Structured Programming Language)
        Department of Computer Science and Engineering
                     DUET, Gazipur-1700

              •   Md. Shohidul Islam
                  Lecturer, Department of CSE

              •   Md. Mahbub Alam
                  Lecture, Department of CSE



                  June, 2010(EVEN SEMESTER)


Md. Mahbub Alam       Structured Programming Language    1
                                 (CSE-1121)
Text Books and Other Class Room Material

      Text Books
          1.      Programming in ANSI C (3rd Edition) by E Balagurusamy
          2.      C – The Complete Reference (4th Edition) by Herbert Schildt
          3.      C – How To Program (4th Edition) by Deitel & Deitel

      Useful Links
          •       http://www.lysator.liu.se/c/bwk-tutor.html
          •       http://www.cs.cf.ac.uk/Dave/C




Md. Mahbub Alam               Structured Programming Language                   2
                                         (CSE-1121)
Course Outline
         Introduction to C programming
         Constants, variable & data types
         C Operators & expressions
         Managing I/O operations in C
         C Control structure
         C Arrays
         C Characters and Strings
         C Functions
         C Pointers
         Structure and Union in C
         Dynamic Memory Allocation in C
         File processing in C
         Graphics programming in C
         Built in functions in C




 Md. Mahbub Alam         Structured Programming Language   3
                                    (CSE-1121)
Class Hour
         Theory: 2 lecture per week (Sunday & Tuesday 08:50 AM – 09:40 AM )
         Room No - 314
         Lab: Tuesday 11:00 AM – 01:30 PM & 02:30 PM – 05:00 PM
         Room No – Software Lab

How Contact With Me
        Room No : 332
        Mobile : +8801672917778
        Email : emahbub.cse@gmail.com




Md. Mahbub Alam            Structured Programming Language                    4
                                      (CSE-1121)
Marks Distribution
                                                 Total Mark      300
        Class Attendance                                        10%
        Class Test/Quiz Test/Assignment                         20%
        Final Exam                                              70%
                                                      Total 100%

Grading System
          Numerical Grade           Letter Grade         Grade point
         80% or above           A+ (A Plus)                   4.00
         75% to less than 80%   A (A Regular )                3.75
         70% to less than 75%   A- (A Minus)                  3.50
         65% to less than 70%   B+ (B Plus)                   3.25
         60% to less than 65%   B (B Regular)                 3.00
         55% to less than 60%   B- (B Minus)                  2.75
         50% to less than 55%   C+ (C Plus)                   2.50
         45% to less than 50%   C (C Regular)                 2.25
         40% to less than 45%   D                             2.00
         Less than 40%          F                             0.00


Md. Mahbub Alam                  Structured Programming Language       5
                                            (CSE-1121)
Lecture01 (Introduction to C programming )
June 13, 2010
      Today's Outline
         History of C
         Importance of C
         Basic Structure of C program
         “Hello world program”
         C program development environment




 Md. Mahbub Alam    Structured Programming Language   6
                               (CSE-1121)
History of C
C evolved from two previous programming languages, BCPL and B
by “Dennis Ritchie” at Bell Laboratories on DEC PDP-11 machine
in 1972.
 - In 1967, BCPL (Basic Combined Programming Language) was developed by
   Martin Richards as a language for writing operating system software &
   compilers.
 - In 1970, Ken Thompson developed B using many features of BCPL and early
   versions of UNIX operating system at Bell Laboratories on DEC PDP-7
   machine.
Initially, C widely known as the development language of the UNIX
operating system but today virtually all new major operating systems
are written in C and/or C++.
By the late 1970's, C had evolved into what is now referred as
"Traditional C“.
 Md. Mahbub Alam       Structured Programming Language             7
                                  (CSE-1121)
History of C (Cont.)
Rapid expansion of C over various types of computers led to many
variations of the language that were similar but often incompatible
which was serious problem for program developers who needed to
develop platform independent code.
A technical committee (X3J11) was created under ANSI to define a
standard version of C. In 1989, the committee approved a standard
version of which was known as ANSI C (C89).
In 1990, this standard was approved by ISO referred to as
ANSI/ISO Standard C which was updated in 1999 referred to as
C99.




Md. Mahbub Alam     Structured Programming Language          8
                               (CSE-1121)
Why teach C?
• C is small (only 32 keywords).
• C has rich set of built-in functions and support variety of data
  types & operators.
• C is highly portable (Machine independent).
• C is structured.
• C has ability to extend itself.
• C is stable (the language doesn’t change much).
• C is quick running (code written in c is efficient & fast).
• C is the basis for many other languages (Java, C++, Perl etc).
• C is a Programmers Language.

  It may not feel like it but C is one of the easiest language to
  learn.

  Md. Mahbub Alam      Structured Programming Language              9
                                  (CSE-1121)
Basic Structure of C Program
Documentation Section               Set of comments lines( prg. name, author & other info)
Link Section                        Link the program with functions of system library
Definition Section                  Defines all symbolic constants
Global Declaration Section          Declares global variables & user-defined functions
main() Function Section
                                    Every program must have main() function. Program
{                                   execution begins at opening braces & ends at closing
}                                   braces of main() function.
Subprogram Section
function1()
{                                   Definition of all user-defined functions
}
::::::::::
functionN()
{
}

   Md. Mahbub Alam           Structured Programming Language                             10
                                        (CSE-1121)
Hello World Program

                                             Comments

/* My first C program which prints Hello World */

#include <stdio.h>
                                                   Main() function begin here
int main ()
{                                          Library function
    printf("Hello World!n");
    return 0;
}                      Return 0 from main means our program
                                  finished without errors



                                       Main() function ends here


  Md. Mahbub Alam      Structured Programming Language                      11
                                  (CSE-1121)
Typical C program
                                            development environment




Md. Mahbub Alam   Structured Programming Language                 12
                             (CSE-1121)
Any Question?




Md. Mahbub Alam   Structured Programming Language   13
                             (CSE-1121)
Thank You All




Md. Mahbub Alam     Structured Programming Language   14
                               (CSE-1121)

More Related Content

What's hot

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)Shujaat Abbas
 
Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Nuzhat Memon
 
SysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming LanguageSysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming LanguageWongyos Keardsri
 
Introduction to C Language
Introduction to C LanguageIntroduction to C Language
Introduction to C LanguageKamal Acharya
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programmingAlpana Gupta
 
Introduction of c programming
Introduction of c programmingIntroduction of c programming
Introduction of c programmingTarun Sharma
 
Principles of-programming-languages-lecture-notes-
Principles of-programming-languages-lecture-notes-Principles of-programming-languages-lecture-notes-
Principles of-programming-languages-lecture-notes-Krishna Sai
 
Programming language
Programming languageProgramming language
Programming languageDhani Ahmad
 
introduction to C programming (C)
introduction to C programming (C)introduction to C programming (C)
introduction to C programming (C)Abhishek Walia
 
PROGRAMMING LANGUAGES
PROGRAMMING LANGUAGESPROGRAMMING LANGUAGES
PROGRAMMING LANGUAGESABHINAV SINGH
 
Programing paradigm &amp; implementation
Programing paradigm &amp; implementationPrograming paradigm &amp; implementation
Programing paradigm &amp; implementationBilal Maqbool ツ
 

What's hot (20)

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)
 
Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)
 
C programming part1
C programming part1C programming part1
C programming part1
 
C PROGRAMMING
C PROGRAMMINGC PROGRAMMING
C PROGRAMMING
 
SysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming LanguageSysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming Language
 
Abc c program
Abc c programAbc c program
Abc c program
 
Introduction to C Language
Introduction to C LanguageIntroduction to C Language
Introduction to C Language
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
C Programming Language
C Programming LanguageC Programming Language
C Programming Language
 
Introduction of c programming
Introduction of c programmingIntroduction of c programming
Introduction of c programming
 
Principles of-programming-languages-lecture-notes-
Principles of-programming-languages-lecture-notes-Principles of-programming-languages-lecture-notes-
Principles of-programming-languages-lecture-notes-
 
Introduction to programming languages part 1
Introduction to programming languages   part 1Introduction to programming languages   part 1
Introduction to programming languages part 1
 
Programming language
Programming languageProgramming language
Programming language
 
Introduction to Procedural Programming in C++
Introduction to Procedural Programming in C++Introduction to Procedural Programming in C++
Introduction to Procedural Programming in C++
 
01 c
01 c01 c
01 c
 
introduction to C programming (C)
introduction to C programming (C)introduction to C programming (C)
introduction to C programming (C)
 
PROGRAMMING LANGUAGES
PROGRAMMING LANGUAGESPROGRAMMING LANGUAGES
PROGRAMMING LANGUAGES
 
C languaGE UNIT-1
C languaGE UNIT-1C languaGE UNIT-1
C languaGE UNIT-1
 
Programing paradigm &amp; implementation
Programing paradigm &amp; implementationPrograming paradigm &amp; implementation
Programing paradigm &amp; implementation
 
C Language
C LanguageC Language
C Language
 

Viewers also liked

Gtk development-using-glade-3
Gtk development-using-glade-3Gtk development-using-glade-3
Gtk development-using-glade-3caezsar
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programmingSivant Kolhe
 
Introduction to the c programming language (amazing and easy book for beginners)
Introduction to the c programming language (amazing and easy book for beginners)Introduction to the c programming language (amazing and easy book for beginners)
Introduction to the c programming language (amazing and easy book for beginners)mujeeb memon
 
Brief introduction to the c programming language
Brief introduction to the c programming languageBrief introduction to the c programming language
Brief introduction to the c programming languageKumar Gaurav
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGAbhishek Dwivedi
 

Viewers also liked (9)

Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
C programming
C programmingC programming
C programming
 
C introduction by thooyavan
C introduction by  thooyavanC introduction by  thooyavan
C introduction by thooyavan
 
Gtk development-using-glade-3
Gtk development-using-glade-3Gtk development-using-glade-3
Gtk development-using-glade-3
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
Introduction to the c programming language (amazing and easy book for beginners)
Introduction to the c programming language (amazing and easy book for beginners)Introduction to the c programming language (amazing and easy book for beginners)
Introduction to the c programming language (amazing and easy book for beginners)
 
Brief introduction to the c programming language
Brief introduction to the c programming languageBrief introduction to the c programming language
Brief introduction to the c programming language
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 

Similar to Lecture01 (introduction to c programming)

Lecture01-Introduction-to-C-programming-converted (4).pptx
Lecture01-Introduction-to-C-programming-converted (4).pptxLecture01-Introduction-to-C-programming-converted (4).pptx
Lecture01-Introduction-to-C-programming-converted (4).pptxMdMuaz2
 
C programming presentation for university
C programming presentation for universityC programming presentation for university
C programming presentation for universitySheikh Monirul Hasan
 
Intro. to prog. c++
Intro. to prog. c++Intro. to prog. c++
Intro. to prog. c++KurdGul
 
c++ programming language Lecture 1-3.ppt
c++ programming language Lecture 1-3.pptc++ programming language Lecture 1-3.ppt
c++ programming language Lecture 1-3.pptssuser8ac8e7
 
Chapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptxChapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptxAbdalla536859
 
Module 201 2 20 just 20 basic
Module 201   2  20  just 20 basic Module 201   2  20  just 20 basic
Module 201 2 20 just 20 basic Nick Racers
 
C programming presentation(final)
C programming presentation(final)C programming presentation(final)
C programming presentation(final)aaravSingh41
 
C Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYC Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYRajeshkumar Reddy
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming LanguageRamaBoya2
 
C notes by m v b reddy(gitam)imp notes all units notes 5 unit order
C notes by m v b  reddy(gitam)imp  notes  all units notes  5 unit orderC notes by m v b  reddy(gitam)imp  notes  all units notes  5 unit order
C notes by m v b reddy(gitam)imp notes all units notes 5 unit orderMalikireddy Bramhananda Reddy
 
Chapter 1 - Basic concepts of programming.pdf
Chapter 1 - Basic concepts of programming.pdfChapter 1 - Basic concepts of programming.pdf
Chapter 1 - Basic concepts of programming.pdfKirubelWondwoson1
 

Similar to Lecture01 (introduction to c programming) (20)

Lecture01-Introduction-to-C-programming-converted (4).pptx
Lecture01-Introduction-to-C-programming-converted (4).pptxLecture01-Introduction-to-C-programming-converted (4).pptx
Lecture01-Introduction-to-C-programming-converted (4).pptx
 
Intro1
Intro1Intro1
Intro1
 
Comparison between C and C++
Comparison between C and C++Comparison between C and C++
Comparison between C and C++
 
Programming.pptx
Programming.pptxProgramming.pptx
Programming.pptx
 
C programming presentation for university
C programming presentation for universityC programming presentation for university
C programming presentation for university
 
Intro. to prog. c++
Intro. to prog. c++Intro. to prog. c++
Intro. to prog. c++
 
c++ programming language Lecture 1-3.ppt
c++ programming language Lecture 1-3.pptc++ programming language Lecture 1-3.ppt
c++ programming language Lecture 1-3.ppt
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
Chapter 1 - Overview of C
Chapter 1 - Overview of CChapter 1 - Overview of C
Chapter 1 - Overview of C
 
Chapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptxChapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptx
 
C vs c++
C vs c++C vs c++
C vs c++
 
Module 1 2 just basic-
Module 1 2  just basic-Module 1 2  just basic-
Module 1 2 just basic-
 
Module 201 2 20 just 20 basic
Module 201   2  20  just 20 basic Module 201   2  20  just 20 basic
Module 201 2 20 just 20 basic
 
C programming presentation(final)
C programming presentation(final)C programming presentation(final)
C programming presentation(final)
 
CS3251-_PIC
CS3251-_PICCS3251-_PIC
CS3251-_PIC
 
C Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYC Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDY
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 
C_Programming_Notes_ICE
C_Programming_Notes_ICEC_Programming_Notes_ICE
C_Programming_Notes_ICE
 
C notes by m v b reddy(gitam)imp notes all units notes 5 unit order
C notes by m v b  reddy(gitam)imp  notes  all units notes  5 unit orderC notes by m v b  reddy(gitam)imp  notes  all units notes  5 unit order
C notes by m v b reddy(gitam)imp notes all units notes 5 unit order
 
Chapter 1 - Basic concepts of programming.pdf
Chapter 1 - Basic concepts of programming.pdfChapter 1 - Basic concepts of programming.pdf
Chapter 1 - Basic concepts of programming.pdf
 

Recently uploaded

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 

Recently uploaded (20)

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 

Lecture01 (introduction to c programming)

  • 1. CSE-1121 (Structured Programming Language) Department of Computer Science and Engineering DUET, Gazipur-1700 • Md. Shohidul Islam Lecturer, Department of CSE • Md. Mahbub Alam Lecture, Department of CSE June, 2010(EVEN SEMESTER) Md. Mahbub Alam Structured Programming Language 1 (CSE-1121)
  • 2. Text Books and Other Class Room Material Text Books 1. Programming in ANSI C (3rd Edition) by E Balagurusamy 2. C – The Complete Reference (4th Edition) by Herbert Schildt 3. C – How To Program (4th Edition) by Deitel & Deitel Useful Links • http://www.lysator.liu.se/c/bwk-tutor.html • http://www.cs.cf.ac.uk/Dave/C Md. Mahbub Alam Structured Programming Language 2 (CSE-1121)
  • 3. Course Outline Introduction to C programming Constants, variable & data types C Operators & expressions Managing I/O operations in C C Control structure C Arrays C Characters and Strings C Functions C Pointers Structure and Union in C Dynamic Memory Allocation in C File processing in C Graphics programming in C Built in functions in C Md. Mahbub Alam Structured Programming Language 3 (CSE-1121)
  • 4. Class Hour Theory: 2 lecture per week (Sunday & Tuesday 08:50 AM – 09:40 AM ) Room No - 314 Lab: Tuesday 11:00 AM – 01:30 PM & 02:30 PM – 05:00 PM Room No – Software Lab How Contact With Me Room No : 332 Mobile : +8801672917778 Email : emahbub.cse@gmail.com Md. Mahbub Alam Structured Programming Language 4 (CSE-1121)
  • 5. Marks Distribution Total Mark 300 Class Attendance 10% Class Test/Quiz Test/Assignment 20% Final Exam 70% Total 100% Grading System Numerical Grade Letter Grade Grade point 80% or above A+ (A Plus) 4.00 75% to less than 80% A (A Regular ) 3.75 70% to less than 75% A- (A Minus) 3.50 65% to less than 70% B+ (B Plus) 3.25 60% to less than 65% B (B Regular) 3.00 55% to less than 60% B- (B Minus) 2.75 50% to less than 55% C+ (C Plus) 2.50 45% to less than 50% C (C Regular) 2.25 40% to less than 45% D 2.00 Less than 40% F 0.00 Md. Mahbub Alam Structured Programming Language 5 (CSE-1121)
  • 6. Lecture01 (Introduction to C programming ) June 13, 2010 Today's Outline History of C Importance of C Basic Structure of C program “Hello world program” C program development environment Md. Mahbub Alam Structured Programming Language 6 (CSE-1121)
  • 7. History of C C evolved from two previous programming languages, BCPL and B by “Dennis Ritchie” at Bell Laboratories on DEC PDP-11 machine in 1972. - In 1967, BCPL (Basic Combined Programming Language) was developed by Martin Richards as a language for writing operating system software & compilers. - In 1970, Ken Thompson developed B using many features of BCPL and early versions of UNIX operating system at Bell Laboratories on DEC PDP-7 machine. Initially, C widely known as the development language of the UNIX operating system but today virtually all new major operating systems are written in C and/or C++. By the late 1970's, C had evolved into what is now referred as "Traditional C“. Md. Mahbub Alam Structured Programming Language 7 (CSE-1121)
  • 8. History of C (Cont.) Rapid expansion of C over various types of computers led to many variations of the language that were similar but often incompatible which was serious problem for program developers who needed to develop platform independent code. A technical committee (X3J11) was created under ANSI to define a standard version of C. In 1989, the committee approved a standard version of which was known as ANSI C (C89). In 1990, this standard was approved by ISO referred to as ANSI/ISO Standard C which was updated in 1999 referred to as C99. Md. Mahbub Alam Structured Programming Language 8 (CSE-1121)
  • 9. Why teach C? • C is small (only 32 keywords). • C has rich set of built-in functions and support variety of data types & operators. • C is highly portable (Machine independent). • C is structured. • C has ability to extend itself. • C is stable (the language doesn’t change much). • C is quick running (code written in c is efficient & fast). • C is the basis for many other languages (Java, C++, Perl etc). • C is a Programmers Language. It may not feel like it but C is one of the easiest language to learn. Md. Mahbub Alam Structured Programming Language 9 (CSE-1121)
  • 10. Basic Structure of C Program Documentation Section Set of comments lines( prg. name, author & other info) Link Section Link the program with functions of system library Definition Section Defines all symbolic constants Global Declaration Section Declares global variables & user-defined functions main() Function Section Every program must have main() function. Program { execution begins at opening braces & ends at closing } braces of main() function. Subprogram Section function1() { Definition of all user-defined functions } :::::::::: functionN() { } Md. Mahbub Alam Structured Programming Language 10 (CSE-1121)
  • 11. Hello World Program Comments /* My first C program which prints Hello World */ #include <stdio.h> Main() function begin here int main () { Library function printf("Hello World!n"); return 0; } Return 0 from main means our program finished without errors Main() function ends here Md. Mahbub Alam Structured Programming Language 11 (CSE-1121)
  • 12. Typical C program development environment Md. Mahbub Alam Structured Programming Language 12 (CSE-1121)
  • 13. Any Question? Md. Mahbub Alam Structured Programming Language 13 (CSE-1121)
  • 14. Thank You All Md. Mahbub Alam Structured Programming Language 14 (CSE-1121)