SlideShare a Scribd company logo
COMPUTER
PROGRAMMING-I
CAP118
What is a programming language?
• Programming Language is
• A tool for instructing machines.
• A meansof communicating between programmers.
• A meansof controlling computerized devices.
• A notation for algorithms.
Programming Domains
• Scientific applications
• Businessapplications
• Artificial intelligence
• Systemsprogramming
• Scripting languages
• Special purposelanguages
Machine Language
• Machinelanguageisthelowest-level programming language.
• Machine languages are the only languages understood by
computers.
• A computer programming language consisting of binary or
hexadecimal instructions which a computer can respond to
directly.
Why Humans Don't Use Machine
Language
• Machine languages are almost impossible for humans to use
becausethey consist entirely of numbers.
• Programmers, therefore, use either a high-level programming
languageor an assembly language.
• An assembly language contains the same instructions as a
machine language, but the instructions
and variables have names instead of being just numbers.
Types of Programming Language
Assembly Language
• A low-level symbolic codeconverted by an assembler.
• Assembly language is converted into executable machine code by a
utility program referred to asan assembler likeNASM, MASM, etc.
• A processor understands only machine language instructions, which
arestringsof 1'sand 0's.
• However, machine language is too obscure and complex for using in
software development. So, the low-level assembly language is
designed for a specific family of processors that represents various
instructionsin symbolic codeand amoreunderstandableform.
Advantages of Assembly Language
Having an understanding of assembly languagemakesone
awareof −
•How programsinterfacewith OS, processor, and BIOS;
•How dataisrepresented in memory and other external devices;
•How theprocessor accessesand executesinstruction;
•How instructionsaccessand processdata;
•How aprogram accessesexternal devices.
High Level Language
• A high-level language is a programming language such
as C, FORTRAN, or Pascal that enables a programmer to
write programs that are more or less independent of a
particular typeof computer.
• Such languages are considered high-level because they are
closer to human languages.
Advantages of high-level languages
• Better portability (program runson many CPUs)
• Richer datatypesand memory management
• Natural structuresfor expressing flow of control
• Much better support for softwaremaintenance
• Much better support for softwarereuse
Translation Process of HLL
• Compiler: Translatesan entirehigh-level languageprogram
into machinecodebeforeit isexecuted.
• Interpreter: Simulatesahigh-level languageprogram,
translating commandsto machinecodealong theway, only
asneeded.
Compiler
Features of C language
• It is a robust language with rich set of built-in functions and operators
that can beused to writeany complex program.
• The C compiler combines the capabilities of an assembly language
with featuresof ahigh-level language.
• Programs Written in C are efficient and fast. This is due to its variety
of datatypeand powerful operators.
• C is highly portable this means that programs once written can be run
on another machineswith littleor no modification.
• Another important featureof C program, isitsability to extend itself.
Features of C language
C - Program Structure
A C program basically consistsof thefollowing parts−
•Preprocessor Commands
•Functions
•Variables
•Statements& Expressions
•Comments
Sample Program
• Let ustakealook at thevariouspartsof theaboveprogram −
• The first line of the program #include <stdio.h> is a preprocessor
command, which tells a C compiler to include stdio.h file before going to
actual compilation.
• The next line int main() is the main function where the program execution
begins.
• The next line /*...*/will be ignored by the compiler and it has been put to
add additional comments in the program. So such linesare called comments
in theprogram.
• The next line printf(...) is another function available in C which causes the
message"Hello, World!" to bedisplayed on thescreen.
• The next line return 0; terminates the main() function and returnsthevalue
0.
Character set of C
• It denotesany alphabet, digit or special symbol used to represent
information.
1.      Source characterset
                                a.      Alphabets
                                b.      Digits
                                c.      Special Characters
                                d.      WhiteSpaces
2.      Execution characterset
                                a.     EscapeSequence
Source character set
• ALPHABETS
            Uppercase letters  ----------  A-Z
            Lowercase letters  ----------  a-z
DIGITS   --------------------------------  0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Special Characters
WHITE SPACE CHARACTERS
Execution Character Set
• Certain ASCII characters are unprintable, which means they are not
displayed on the screen or printer. Those characters perform other
functions aside from displaying text. Examples are backspacing,
moving to anewline, or ringing abell.
• These are employed at the time of execution of the program.
Execution characters set are always represented by a backslash ()
followed by a character. Note that each one of character constants
represents one character, although they consist of two characters.
Thesecharacterscombinationsarecalled asescape sequence
Identifiers
• In C language identifiers are the names given to variables, constants,
functionsand user-definedata.
• Theseidentifier aredefined against aset of rules.
Keywords
C - Variables
• A variable is nothing but a name given to a storage area that our
programscan manipulate.
• Each variable in C has a specific type, which determines the size and
layout of thevariable'smemory;
• The name of a variable can be composed of letters, digits, and the
underscore character. It must begin with either a letter or an
underscore. Upper and lowercase letters are distinct because C is case-
sensitive. 
Types of Variable

More Related Content

PPTX
Programming Language
PPT
Computer languages 11
PPT
Programming in c
PPTX
Program & language generation
PPTX
Programming languages
PPT
Generations Of Programming Languages
PPT
Introduction to c programming
Programming Language
Computer languages 11
Programming in c
Program & language generation
Programming languages
Generations Of Programming Languages
Introduction to c programming

What's hot (20)

PPT
Why C is Called Structured Programming Language
PPTX
Programming Fundamental Slide No.1
PPT
Compiler Design Basics
PPT
Programming language design and implemenation
PPTX
introduction to programming languages
PPTX
C++ Overview PPT
PDF
Introduction to c++ ppt 1
PPT
History of c++
PDF
C++ OOPS Concept
PPTX
Looping statements in C
PPSX
Programming languages
PPT
Generation of computer languages
PPTX
compiler and their types
PPTX
Evolution of programming language
PPT
PPTX
bus and memory tranfer (computer organaization)
PPSX
C++ Programming Language
PPTX
Malloc() and calloc() in c
PPT
Control Structures
PPTX
Introduction to C Language
Why C is Called Structured Programming Language
Programming Fundamental Slide No.1
Compiler Design Basics
Programming language design and implemenation
introduction to programming languages
C++ Overview PPT
Introduction to c++ ppt 1
History of c++
C++ OOPS Concept
Looping statements in C
Programming languages
Generation of computer languages
compiler and their types
Evolution of programming language
bus and memory tranfer (computer organaization)
C++ Programming Language
Malloc() and calloc() in c
Control Structures
Introduction to C Language
Ad

Similar to introduction to C programming (C) (20)

PPT
Computer languages
PPTX
week 2 - INTRO TO PROGRAMMING.pptx
PPTX
Agro informatics centre up State of Lec 6.pptx
PPT
Introduction to C for Btech 1st year.ppt
PPTX
Computer languages
PPTX
FPL - Part 1 (Sem - I 2013 )
PPTX
maincse-150510153437-lva1-app6892 (1).pptx
PPTX
Introduction to c programming
PPTX
Unit ii
PPT
maincse-150510153437-lva1-app68Computer Science92.ppt
PPTX
Embedded c c++ programming fundamentals master
PDF
X-CS-8.0 Programming in C Language 2022-2023.pdf
PPTX
Programming languages,compiler,interpreter,softwares
PPTX
programming.pptx
PDF
Introduction to computer programming
PDF
sege.pdf
PPTX
01-PROGRAMMING introA of the class name. Pptx
PPT
Presentation on Programming Languages.
PPT
C++ Program session new edition 2025.ppt
PPTX
UNIT - 1jhjhjbkjhkjhkjhkjhkjhhkkhhh.pptx
Computer languages
week 2 - INTRO TO PROGRAMMING.pptx
Agro informatics centre up State of Lec 6.pptx
Introduction to C for Btech 1st year.ppt
Computer languages
FPL - Part 1 (Sem - I 2013 )
maincse-150510153437-lva1-app6892 (1).pptx
Introduction to c programming
Unit ii
maincse-150510153437-lva1-app68Computer Science92.ppt
Embedded c c++ programming fundamentals master
X-CS-8.0 Programming in C Language 2022-2023.pdf
Programming languages,compiler,interpreter,softwares
programming.pptx
Introduction to computer programming
sege.pdf
01-PROGRAMMING introA of the class name. Pptx
Presentation on Programming Languages.
C++ Program session new edition 2025.ppt
UNIT - 1jhjhjbkjhkjhkjhkjhkjhhkkhhh.pptx
Ad

Recently uploaded (20)

PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Approach and Philosophy of On baking technology
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Empathic Computing: Creating Shared Understanding
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Big Data Technologies - Introduction.pptx
PDF
KodekX | Application Modernization Development
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Review of recent advances in non-invasive hemoglobin estimation
Approach and Philosophy of On baking technology
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Chapter 3 Spatial Domain Image Processing.pdf
Machine learning based COVID-19 study performance prediction
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Empathic Computing: Creating Shared Understanding
The AUB Centre for AI in Media Proposal.docx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Big Data Technologies - Introduction.pptx
KodekX | Application Modernization Development
sap open course for s4hana steps from ECC to s4
MYSQL Presentation for SQL database connectivity
Spectral efficient network and resource selection model in 5G networks
Unlocking AI with Model Context Protocol (MCP)
Build a system with the filesystem maintained by OSTree @ COSCUP 2025

introduction to C programming (C)

  • 2. What is a programming language? • Programming Language is • A tool for instructing machines. • A meansof communicating between programmers. • A meansof controlling computerized devices. • A notation for algorithms.
  • 3. Programming Domains • Scientific applications • Businessapplications • Artificial intelligence • Systemsprogramming • Scripting languages • Special purposelanguages
  • 4. Machine Language • Machinelanguageisthelowest-level programming language. • Machine languages are the only languages understood by computers. • A computer programming language consisting of binary or hexadecimal instructions which a computer can respond to directly.
  • 5. Why Humans Don't Use Machine Language
  • 6. • Machine languages are almost impossible for humans to use becausethey consist entirely of numbers. • Programmers, therefore, use either a high-level programming languageor an assembly language. • An assembly language contains the same instructions as a machine language, but the instructions and variables have names instead of being just numbers.
  • 8. Assembly Language • A low-level symbolic codeconverted by an assembler. • Assembly language is converted into executable machine code by a utility program referred to asan assembler likeNASM, MASM, etc. • A processor understands only machine language instructions, which arestringsof 1'sand 0's. • However, machine language is too obscure and complex for using in software development. So, the low-level assembly language is designed for a specific family of processors that represents various instructionsin symbolic codeand amoreunderstandableform.
  • 9. Advantages of Assembly Language Having an understanding of assembly languagemakesone awareof − •How programsinterfacewith OS, processor, and BIOS; •How dataisrepresented in memory and other external devices; •How theprocessor accessesand executesinstruction; •How instructionsaccessand processdata; •How aprogram accessesexternal devices.
  • 10. High Level Language • A high-level language is a programming language such as C, FORTRAN, or Pascal that enables a programmer to write programs that are more or less independent of a particular typeof computer. • Such languages are considered high-level because they are closer to human languages.
  • 11. Advantages of high-level languages • Better portability (program runson many CPUs) • Richer datatypesand memory management • Natural structuresfor expressing flow of control • Much better support for softwaremaintenance • Much better support for softwarereuse
  • 12. Translation Process of HLL • Compiler: Translatesan entirehigh-level languageprogram into machinecodebeforeit isexecuted. • Interpreter: Simulatesahigh-level languageprogram, translating commandsto machinecodealong theway, only asneeded.
  • 14. Features of C language • It is a robust language with rich set of built-in functions and operators that can beused to writeany complex program. • The C compiler combines the capabilities of an assembly language with featuresof ahigh-level language. • Programs Written in C are efficient and fast. This is due to its variety of datatypeand powerful operators. • C is highly portable this means that programs once written can be run on another machineswith littleor no modification. • Another important featureof C program, isitsability to extend itself.
  • 15. Features of C language
  • 16. C - Program Structure A C program basically consistsof thefollowing parts− •Preprocessor Commands •Functions •Variables •Statements& Expressions •Comments
  • 18. • Let ustakealook at thevariouspartsof theaboveprogram − • The first line of the program #include <stdio.h> is a preprocessor command, which tells a C compiler to include stdio.h file before going to actual compilation. • The next line int main() is the main function where the program execution begins. • The next line /*...*/will be ignored by the compiler and it has been put to add additional comments in the program. So such linesare called comments in theprogram. • The next line printf(...) is another function available in C which causes the message"Hello, World!" to bedisplayed on thescreen. • The next line return 0; terminates the main() function and returnsthevalue 0.
  • 19. Character set of C • It denotesany alphabet, digit or special symbol used to represent information. 1.      Source characterset                                 a.      Alphabets                                 b.      Digits                                 c.      Special Characters                                 d.      WhiteSpaces 2.      Execution characterset                                 a.     EscapeSequence
  • 20. Source character set • ALPHABETS             Uppercase letters  ----------  A-Z             Lowercase letters  ----------  a-z DIGITS   --------------------------------  0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  • 23. Execution Character Set • Certain ASCII characters are unprintable, which means they are not displayed on the screen or printer. Those characters perform other functions aside from displaying text. Examples are backspacing, moving to anewline, or ringing abell. • These are employed at the time of execution of the program. Execution characters set are always represented by a backslash () followed by a character. Note that each one of character constants represents one character, although they consist of two characters. Thesecharacterscombinationsarecalled asescape sequence
  • 24. Identifiers • In C language identifiers are the names given to variables, constants, functionsand user-definedata. • Theseidentifier aredefined against aset of rules.
  • 26. C - Variables • A variable is nothing but a name given to a storage area that our programscan manipulate. • Each variable in C has a specific type, which determines the size and layout of thevariable'smemory; • The name of a variable can be composed of letters, digits, and the underscore character. It must begin with either a letter or an underscore. Upper and lowercase letters are distinct because C is case- sensitive.