KEMBAR78
C Programming Lab_Program_Presentation__a | PPTX
(IMT-2022 Batch)
ABV-Indian Institute of Information Technology and Management, Gwalior
Faculty Name :- Dr. Vinal Patel
Lab TA(s) :
1. Ravindra Nath Shukla (Ph.D. Scholar)
2. Jai Kumar Vagairya (M. Tech. Student)
Computer Programming Lab
(Session - 1)
2
Course Outline
Learning Objectives :-
• To develop ability to write programs and map scientific problems into
computational frameworks.
• To utilize the concepts of programming in application development.
• To able to design, test and debug the programs.
3
Course Contents
• Module I: Programming with C: Fundamentals of C programming,
Control statements
• Module II: C programming with Functions (call by value and call by
• reference), parameter passing
• Module III: Programming via Recursion, Pointers.
• Module IV: Implementation of Array, String, Structures and Unions.
• Module V: File handling, File redirection, File pointers in C and Python
• Module VI: Problem Solving
4
Introduction Session
• Programming
• Programming Languages
 Low Level Languages
 Machine language
 Assembly language
 High Level languages
 Difference Between High-Level and Low-Level Computer languages
• Introduction to C
• History of C
5
Introduction Continues…..
• C Basic Data types
• C Keywords and Identifiers
• C Flow Control
• C Functions
• C Arrays
• C Pointers
• C Strings
• Structure And Union
• C Files
7
Introduction to Types of Computer Language
• The computer language is defined as code
or syntax which is used to write programs
or any specific applications. It is used to
communicate with computers.
• Broadly the computer language can be
classified into three categories:-
 Machine language,
 Assembly language, and
 High-level language.
Machine Languages
9
• It is the only language the computer understands.
• It is made of 0s and 1s.
• They must be in 0s and 1s because the internal circuit of a computer is
made up of switches, transistors, and other electronic devices that can be
either on or off (1 or 0 respectively).
Example of Machine Language: (on page167)
1 00000000 00000100 0000000000000000
2 01011110 00001100 11000010 0000000000000010
3 11101111 00010110 0000000000000101
10
Assembly Language
• Assembly Language is a low-level programming
language.
• Assembly language is designed to understand the
instruction and provide it to machine language for
further processing.
• In computers, there is an assembler that helps in
converting the assembly code into machine code
executable.
Eg. ASPER (ASsembler for PERipheral Processor Units of Control Data Corporation
computer systems pre-COMPASS),
BAL (Basic AssembLer) - for IBM System/360 and later mainframe systems
High-Level Languages
• Developed to improve programmer efficiency from symbolic
languages & to change focus from the computer to the problem
being solved
• They’re portable to different computers
• They still need to be converted to machine languages in a
process called compilation
• Examples include:
• BASIC
• COBOL
• Pascal
• Ada
• C
• C++
• Java
• Python
12
Introduction to C
• C programming is a general-purpose, procedural, imperative
computer programming language.
• Developed in 1972 by Dennis M. Ritchie at the Bell Telephone
Laboratories to develop the UNIX operating system.
• C is the most widely used computer language.
13
Why to Learn C Programming?
• Easy to learn
• Structured language
• It produces efficient programs
• It can handle low-level activities
• It can be compiled on a variety of computer platforms
14
Facts about C
• C was invented to write an operating system called UNIX.
• C is a successor of B language which was introduced around the
early 1970s.
• The language was formalized in 1988 by the American National
Standard Institute (ANSI).
• The UNIX OS was totally written in C.
• Today C is the most widely used and popular System Programming
Language.
• Most of the state-of-the-art software have been implemented using
C.
15
Sample program : print Hello World using C
• A small conventional C Programming Hello World program,
16
Applications of C Programming
C was initially used for system development work, particularly the programs that
make-up the operating system. C was adopted as a system development language
because it produces code that runs nearly as fast as the code written in assembly
language. Some examples of the use of C are –
• Operating Systems
• Language Compilers
• Assemblers
• Text Editors
• Print Spoolers
• Network Drivers
• Modern Programs
• Databases
• Language Interpreters
• Utilities
17
History of C
The root of all modern languages is ALGOL, introduced in the
early 1960s. ALGOL was the first computer language to use a
block structure.
 In 1967, Martin Richards developed a language called BCPL
(Basic Combined Programming
Language) primarily for writing system software.
 In 1970, Ken Thompson created a language ‘B’ using BPCL to
create early versions of UNIX operating system.
C evolved from ALGOL, BPCL and B. It uses many concepts from
these languages and added the concept of data types and other
powerful features
18
19
20
21
22
23
24
25
26
C- Basic Syntax
• C - Basic Syntax
27
Thank you !

C Programming Lab_Program_Presentation__a

  • 1.
    (IMT-2022 Batch) ABV-Indian Instituteof Information Technology and Management, Gwalior Faculty Name :- Dr. Vinal Patel Lab TA(s) : 1. Ravindra Nath Shukla (Ph.D. Scholar) 2. Jai Kumar Vagairya (M. Tech. Student) Computer Programming Lab (Session - 1)
  • 2.
    2 Course Outline Learning Objectives:- • To develop ability to write programs and map scientific problems into computational frameworks. • To utilize the concepts of programming in application development. • To able to design, test and debug the programs.
  • 3.
    3 Course Contents • ModuleI: Programming with C: Fundamentals of C programming, Control statements • Module II: C programming with Functions (call by value and call by • reference), parameter passing • Module III: Programming via Recursion, Pointers. • Module IV: Implementation of Array, String, Structures and Unions. • Module V: File handling, File redirection, File pointers in C and Python • Module VI: Problem Solving
  • 4.
    4 Introduction Session • Programming •Programming Languages  Low Level Languages  Machine language  Assembly language  High Level languages  Difference Between High-Level and Low-Level Computer languages • Introduction to C • History of C
  • 5.
    5 Introduction Continues….. • CBasic Data types • C Keywords and Identifiers • C Flow Control • C Functions • C Arrays • C Pointers • C Strings • Structure And Union • C Files
  • 7.
    7 Introduction to Typesof Computer Language • The computer language is defined as code or syntax which is used to write programs or any specific applications. It is used to communicate with computers. • Broadly the computer language can be classified into three categories:-  Machine language,  Assembly language, and  High-level language.
  • 9.
    Machine Languages 9 • Itis the only language the computer understands. • It is made of 0s and 1s. • They must be in 0s and 1s because the internal circuit of a computer is made up of switches, transistors, and other electronic devices that can be either on or off (1 or 0 respectively). Example of Machine Language: (on page167) 1 00000000 00000100 0000000000000000 2 01011110 00001100 11000010 0000000000000010 3 11101111 00010110 0000000000000101
  • 10.
    10 Assembly Language • AssemblyLanguage is a low-level programming language. • Assembly language is designed to understand the instruction and provide it to machine language for further processing. • In computers, there is an assembler that helps in converting the assembly code into machine code executable. Eg. ASPER (ASsembler for PERipheral Processor Units of Control Data Corporation computer systems pre-COMPASS), BAL (Basic AssembLer) - for IBM System/360 and later mainframe systems
  • 11.
    High-Level Languages • Developedto improve programmer efficiency from symbolic languages & to change focus from the computer to the problem being solved • They’re portable to different computers • They still need to be converted to machine languages in a process called compilation • Examples include: • BASIC • COBOL • Pascal • Ada • C • C++ • Java • Python
  • 12.
    12 Introduction to C •C programming is a general-purpose, procedural, imperative computer programming language. • Developed in 1972 by Dennis M. Ritchie at the Bell Telephone Laboratories to develop the UNIX operating system. • C is the most widely used computer language.
  • 13.
    13 Why to LearnC Programming? • Easy to learn • Structured language • It produces efficient programs • It can handle low-level activities • It can be compiled on a variety of computer platforms
  • 14.
    14 Facts about C •C was invented to write an operating system called UNIX. • C is a successor of B language which was introduced around the early 1970s. • The language was formalized in 1988 by the American National Standard Institute (ANSI). • The UNIX OS was totally written in C. • Today C is the most widely used and popular System Programming Language. • Most of the state-of-the-art software have been implemented using C.
  • 15.
    15 Sample program :print Hello World using C • A small conventional C Programming Hello World program,
  • 16.
    16 Applications of CProgramming C was initially used for system development work, particularly the programs that make-up the operating system. C was adopted as a system development language because it produces code that runs nearly as fast as the code written in assembly language. Some examples of the use of C are – • Operating Systems • Language Compilers • Assemblers • Text Editors • Print Spoolers • Network Drivers • Modern Programs • Databases • Language Interpreters • Utilities
  • 17.
    17 History of C Theroot of all modern languages is ALGOL, introduced in the early 1960s. ALGOL was the first computer language to use a block structure.  In 1967, Martin Richards developed a language called BCPL (Basic Combined Programming Language) primarily for writing system software.  In 1970, Ken Thompson created a language ‘B’ using BPCL to create early versions of UNIX operating system. C evolved from ALGOL, BPCL and B. It uses many concepts from these languages and added the concept of data types and other powerful features
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
    26 C- Basic Syntax •C - Basic Syntax
  • 27.