SlideShare a Scribd company logo
•PROGRAMMING IN C – BPLCK24205A
1. Elucidate the basic
architecture and
functionalities of a computer
and also recognize the
hardware parts
2. Apply programming
constructs of C language to
solve the real world problem
3. Explore user-defined data
structures like arrays in
implementing solutions to
problems like searching and
sorting
4. Explore user-defined data
structures like structures,
unions and pointers in
implementing solutions
5. Design and Develop Solutions
to problems using modular
programming constructs
using functions
COURSE OUTCOMES
Introduction to computers, input and output devices, designing efficient programs.
Introduction to C, Structure of C program, Files used in a C program, Compilers,
Compiling and executing C programs, variables, constants, Input/output statements
in C.
Operators in C, Type conversion and typecasting. Decision control and Looping
statements: Introduction to decision control, Conditional branching statements,
iterative statements, nested loops, break and continue statements, goto statement.
Functions-Introduction using functions, Function definition, function declaration,
function call, return statement, passing parameters to functions, scope of variables,
storage classes, recursive functions. Arrays: Declaration of arrays, accessing the
elements of an array, storing values in arrays, Operations on arrays, Passing arrays to
functions.
Two dimensional arrays, operations on two-dimensional arrays, two-dimensional
arrays to functions, multidimensional arrays. Applications of arrays and introduction
to strings: Applications of arrays, case study with sorting techniques. Introduction to
strings: Reading strings, writing strings, summary of functions used to read and write
characters. Suppressing input using a Scanset.
Strings-String taxonomy, operations on strings, Miscellaneous string and character
functions, arrays of strings.
Pointers: Understanding the Computers Memory, Introduction to Pointers, Declaring
Pointer Variables
Structures: Introduction to structures
INTRODUCTION TO C
Introduction to computers, input and output devices, designing
efficient programs. Introduction to C, Structure of C program,
Files used in a C program, Compilers, Compiling and executing C
programs, variables, constants, Input/output statements in C.
INTRODUCTION TO COMPUTERS
What is Computer?
A computer is a machine that manipulates data according to a
list of instructions.
A computer is a device capable of performing computations
and making logical decisions at speed millions and even billion
of times faster them human beings can.
Computer is an electronic machine which is use for data
processing. The output which comes after processing data
through computer is known as Information.
INTRODUCTION TO COMPUTERS
Why Computers?
INTRODUCTION TO COMPUTERS
Components of a Computer
INTRODUCTION TO COMPUTERS
Input and Output devices
INTRODUCTION TO COMPUTERS
Functions of a Computer
Functions of a Computer
Functions of a Computer
Four major functions are:
Input data
Process data
Output information
Store data and information
Data and Information
 All computer processing requires data, which is a collection of
raw facts, figures and symbols, such as numbers, words, images,
video and sound, given to the computer during the input phase.
 Computers manipulate data to create information. Information is
data that is organized, meaningful, and useful.
 During the output Phase, the information that has been created is
put into some form, such as a printed report. The information can
also be put in computer storage for future use.
How Does a Computer Know what to do?
 It must be given a detailed list of instructions, called a compute
program or software, that tells it exactly what to do.
 Before processing a specific job, the computer program
corresponding to that job must be stored in memory.
 Once the program is stored in memory the compute can start the
operation by executing the program instructions one after the
other.
DESIGNING EFFICIENT PROGRAMS
1. Problem Analysis: Understanding the problem and defining clear
objectives.
2. Algorithm Design: Creating step-by-step logic to solve the
problem.
3. Flowcharting: Visualizing program logic using diagrams.
4. Coding: Implementing the algorithm using a programming
language.
5. Debugging: Identifying and fixing logical and syntax errors.
6. Testing: Verifying the correctness of the program under different
conditions.
7. Documentation: Writing clear explanations for better
maintainability.
Characteristics of Efficient Programs
 Readability: Code should be clear and well-structured.
 Functionality: The software meets the requirements and specifications that it was designed for, and
it behaves as expected when it is used in its intended environment.
 Maintainability: Easy to update and modify.
 Performance: Optimized for speed and efficiency.
 Security: The software is protected against unauthorized defects, and it keeps the data and functions
safe from malicious attacks.
 Compatibility: The ability to handle increased data or complexity.
 Reliability: The software is free of defects, and it performs consistently and accurately under
different conditions and scenarios.
Introduction to C
 C is a procedural programming language initially developed by Dennis Ritchie in the
year 1972 at Bell Laboratories of AT&T Labs.
 It was mainly developed as a system programming language to write the UNIX
operating system.
 It is a very popular language, despite being old. The main reason for its popularity is
because it is a fundamental language in the field of computer science.
Why Learn C?
 It is one of the most popular programming languages in the world
 If you know C, you will have no problem learning other popular programming
languages such as Java, Python, C++, C#, etc, as the syntax is similar
 C is very fast, compared to other programming languages, like Java and Python
 C is very versatile; it can be used in both applications and technologies
Features of the C language
Structure of C program
A C program's structure consists of sections for documentation, preprocessor
directives, global declarations, the main function, and other functions
Files used in a C program
Compilers
 Compilers in C are programs that translate source code into machine-readable
instructions.
 Some popular C compilers include Clang, Microsoft Visual C++, and GCC (GNU
Compiler Collection)
 Compilers are large programs that translate source code written in a high-level language
into machine-language instructions. These instructions can be understood by a
computer's CPU.
Compiling and executing C programs
Variables in C
A variable is a storage location in memory with a specific name and type. It holds values
that can change during program execution.
Constants in C
Constants are read-only values that cannot be modified during the execution of a program.
These constants can be of various types, such as integer, floating-point, string, or character
constants.
They are initialized with the declaration and remain same till the end of the program.
#include <stdio.h>
int main() {
// Defining constant
variable
const int a = 10;
printf("%d", a);
return 0;
}
Input/output statements in C
 Input and output operations refer to reading data from external sources and writing data to
external destinations outside the program.
 C provides a standard set of functions to handle input from the user and output to the screen
or to files. These functions are part of the standard input/output library <stdio.h>.
 In C, there are many functions used for input and output in different situations but the most
commonly used functions for Input/Output are scanf() and printf() respectively.
THANK YOU

More Related Content

Similar to Introduction to computers, input and output devices (20)

PDF
6272 cnote
P Kiran Sree
 
PPTX
Team-7 SP.pptxdfghjksdfgduytredfghjkjhgffghj
bayazidalom983
 
DOCX
Let's us c language (sabeel Bugti)
Unviersity of balochistan quetta
 
DOC
C AND DATASTRUCTURES PREPARED BY M V B REDDY
Malikireddy Bramhananda Reddy
 
PPTX
Expection Setting - 1st ppt. pptx
DarshanR953832
 
PPSX
Esoft Metro Campus - Certificate in c / c++ programming
Rasan Samarasinghe
 
DOC
1. introduction to computer
Shankar Gangaju
 
PPT
CHTP5e_01.ppt bbbbbbbbb bbbb
faiqa81
 
PPT
slidenotesece246jun2012-140803084954-phpapp01 (1).ppt
yatakonakiran2
 
PDF
C-PROGRAMMING pdf text book notes vtu important
taheneekb19
 
PPTX
CSE 1201: Structured Programming Language
Zubayer Farazi
 
PPTX
Introduction to C Unit 1
Dr. SURBHI SAROHA
 
PPTX
Basic Computer information and Programming in C
Paj234355
 
PPT
C_Intro.ppt
gitesh_nagar
 
PPTX
lecture Slides - Week 1.programming fundamentals
fazayn927
 
PPT
Introduction to c programming
ABHISHEK fulwadhwa
 
PPT
Introduction to C Programming - I
vampugani
 
PPTX
Chapter 1.pptx
MdSabbirAhmedEkhon
 
PPTX
Chapter-1_c++_programming_course_PBM Solving.pptx
Dora562786
 
PPTX
Introduction to C programming
Rokonuzzaman Rony
 
6272 cnote
P Kiran Sree
 
Team-7 SP.pptxdfghjksdfgduytredfghjkjhgffghj
bayazidalom983
 
Let's us c language (sabeel Bugti)
Unviersity of balochistan quetta
 
C AND DATASTRUCTURES PREPARED BY M V B REDDY
Malikireddy Bramhananda Reddy
 
Expection Setting - 1st ppt. pptx
DarshanR953832
 
Esoft Metro Campus - Certificate in c / c++ programming
Rasan Samarasinghe
 
1. introduction to computer
Shankar Gangaju
 
CHTP5e_01.ppt bbbbbbbbb bbbb
faiqa81
 
slidenotesece246jun2012-140803084954-phpapp01 (1).ppt
yatakonakiran2
 
C-PROGRAMMING pdf text book notes vtu important
taheneekb19
 
CSE 1201: Structured Programming Language
Zubayer Farazi
 
Introduction to C Unit 1
Dr. SURBHI SAROHA
 
Basic Computer information and Programming in C
Paj234355
 
C_Intro.ppt
gitesh_nagar
 
lecture Slides - Week 1.programming fundamentals
fazayn927
 
Introduction to c programming
ABHISHEK fulwadhwa
 
Introduction to C Programming - I
vampugani
 
Chapter 1.pptx
MdSabbirAhmedEkhon
 
Chapter-1_c++_programming_course_PBM Solving.pptx
Dora562786
 
Introduction to C programming
Rokonuzzaman Rony
 

Recently uploaded (20)

PDF
01-introduction to the ProcessDesign.pdf
StiveBrack
 
PPTX
FSE_LLM4SE1_A Tool for In-depth Analysis of Code Execution Reasoning of Large...
cl144
 
PDF
Rapid Prototyping for XR: Lecture 5 - Cross Platform Development
Mark Billinghurst
 
PPTX
CST413 KTU S7 CSE Machine Learning Clustering K Means Hierarchical Agglomerat...
resming1
 
PDF
13th International Conference of Security, Privacy and Trust Management (SPTM...
ijcisjournal
 
PPTX
CST413 KTU S7 CSE Machine Learning Introduction Parameter Estimation MLE MAP ...
resming1
 
PDF
lesson4-occupationalsafetyandhealthohsstandards-240812020130-1a7246d0.pdf
arvingallosa3
 
PPTX
MATERIAL SCIENCE LECTURE NOTES FOR DIPLOMA STUDENTS
SAMEER VISHWAKARMA
 
PPTX
Introduction to File Transfer Protocol with commands in FTP
BeulahS2
 
PDF
Generative AI & Scientific Research : Catalyst for Innovation, Ethics & Impact
AlqualsaDIResearchGr
 
PDF
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
Mark Billinghurst
 
PPTX
Bitumen Emulsion by Dr Sangita Ex CRRI Delhi
grilcodes
 
PPTX
Stability of IBR Dominated Grids - IEEE PEDG 2025 - short.pptx
ssuser307730
 
PPT
FINAL plumbing code for board exam passer
MattKristopherDiaz
 
PDF
تقرير عن التحليل الديناميكي لتدفق الهواء حول جناح.pdf
محمد قصص فتوتة
 
PDF
Designing for Tomorrow – Architecture’s Role in the Sustainability Movement
BIM Services
 
PPTX
Functions in Python Programming Language
BeulahS2
 
PDF
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Mark Billinghurst
 
PPTX
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
moonsony54
 
PDF
FSE-Journal-First-Automated code editing with search-generate-modify.pdf
cl144
 
01-introduction to the ProcessDesign.pdf
StiveBrack
 
FSE_LLM4SE1_A Tool for In-depth Analysis of Code Execution Reasoning of Large...
cl144
 
Rapid Prototyping for XR: Lecture 5 - Cross Platform Development
Mark Billinghurst
 
CST413 KTU S7 CSE Machine Learning Clustering K Means Hierarchical Agglomerat...
resming1
 
13th International Conference of Security, Privacy and Trust Management (SPTM...
ijcisjournal
 
CST413 KTU S7 CSE Machine Learning Introduction Parameter Estimation MLE MAP ...
resming1
 
lesson4-occupationalsafetyandhealthohsstandards-240812020130-1a7246d0.pdf
arvingallosa3
 
MATERIAL SCIENCE LECTURE NOTES FOR DIPLOMA STUDENTS
SAMEER VISHWAKARMA
 
Introduction to File Transfer Protocol with commands in FTP
BeulahS2
 
Generative AI & Scientific Research : Catalyst for Innovation, Ethics & Impact
AlqualsaDIResearchGr
 
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
Mark Billinghurst
 
Bitumen Emulsion by Dr Sangita Ex CRRI Delhi
grilcodes
 
Stability of IBR Dominated Grids - IEEE PEDG 2025 - short.pptx
ssuser307730
 
FINAL plumbing code for board exam passer
MattKristopherDiaz
 
تقرير عن التحليل الديناميكي لتدفق الهواء حول جناح.pdf
محمد قصص فتوتة
 
Designing for Tomorrow – Architecture’s Role in the Sustainability Movement
BIM Services
 
Functions in Python Programming Language
BeulahS2
 
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Mark Billinghurst
 
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
moonsony54
 
FSE-Journal-First-Automated code editing with search-generate-modify.pdf
cl144
 
Ad

Introduction to computers, input and output devices

  • 1. •PROGRAMMING IN C – BPLCK24205A
  • 2. 1. Elucidate the basic architecture and functionalities of a computer and also recognize the hardware parts 2. Apply programming constructs of C language to solve the real world problem 3. Explore user-defined data structures like arrays in implementing solutions to problems like searching and sorting 4. Explore user-defined data structures like structures, unions and pointers in implementing solutions 5. Design and Develop Solutions to problems using modular programming constructs using functions COURSE OUTCOMES
  • 3. Introduction to computers, input and output devices, designing efficient programs. Introduction to C, Structure of C program, Files used in a C program, Compilers, Compiling and executing C programs, variables, constants, Input/output statements in C. Operators in C, Type conversion and typecasting. Decision control and Looping statements: Introduction to decision control, Conditional branching statements, iterative statements, nested loops, break and continue statements, goto statement. Functions-Introduction using functions, Function definition, function declaration, function call, return statement, passing parameters to functions, scope of variables, storage classes, recursive functions. Arrays: Declaration of arrays, accessing the elements of an array, storing values in arrays, Operations on arrays, Passing arrays to functions. Two dimensional arrays, operations on two-dimensional arrays, two-dimensional arrays to functions, multidimensional arrays. Applications of arrays and introduction to strings: Applications of arrays, case study with sorting techniques. Introduction to strings: Reading strings, writing strings, summary of functions used to read and write characters. Suppressing input using a Scanset. Strings-String taxonomy, operations on strings, Miscellaneous string and character functions, arrays of strings. Pointers: Understanding the Computers Memory, Introduction to Pointers, Declaring Pointer Variables Structures: Introduction to structures
  • 4. INTRODUCTION TO C Introduction to computers, input and output devices, designing efficient programs. Introduction to C, Structure of C program, Files used in a C program, Compilers, Compiling and executing C programs, variables, constants, Input/output statements in C.
  • 5. INTRODUCTION TO COMPUTERS What is Computer? A computer is a machine that manipulates data according to a list of instructions. A computer is a device capable of performing computations and making logical decisions at speed millions and even billion of times faster them human beings can. Computer is an electronic machine which is use for data processing. The output which comes after processing data through computer is known as Information.
  • 8. INTRODUCTION TO COMPUTERS Input and Output devices
  • 10. Functions of a Computer
  • 11. Functions of a Computer Four major functions are: Input data Process data Output information Store data and information
  • 12. Data and Information  All computer processing requires data, which is a collection of raw facts, figures and symbols, such as numbers, words, images, video and sound, given to the computer during the input phase.  Computers manipulate data to create information. Information is data that is organized, meaningful, and useful.  During the output Phase, the information that has been created is put into some form, such as a printed report. The information can also be put in computer storage for future use.
  • 13. How Does a Computer Know what to do?  It must be given a detailed list of instructions, called a compute program or software, that tells it exactly what to do.  Before processing a specific job, the computer program corresponding to that job must be stored in memory.  Once the program is stored in memory the compute can start the operation by executing the program instructions one after the other.
  • 14. DESIGNING EFFICIENT PROGRAMS 1. Problem Analysis: Understanding the problem and defining clear objectives. 2. Algorithm Design: Creating step-by-step logic to solve the problem. 3. Flowcharting: Visualizing program logic using diagrams. 4. Coding: Implementing the algorithm using a programming language. 5. Debugging: Identifying and fixing logical and syntax errors. 6. Testing: Verifying the correctness of the program under different conditions. 7. Documentation: Writing clear explanations for better maintainability.
  • 15. Characteristics of Efficient Programs  Readability: Code should be clear and well-structured.  Functionality: The software meets the requirements and specifications that it was designed for, and it behaves as expected when it is used in its intended environment.  Maintainability: Easy to update and modify.  Performance: Optimized for speed and efficiency.  Security: The software is protected against unauthorized defects, and it keeps the data and functions safe from malicious attacks.  Compatibility: The ability to handle increased data or complexity.  Reliability: The software is free of defects, and it performs consistently and accurately under different conditions and scenarios.
  • 16. Introduction to C  C is a procedural programming language initially developed by Dennis Ritchie in the year 1972 at Bell Laboratories of AT&T Labs.  It was mainly developed as a system programming language to write the UNIX operating system.  It is a very popular language, despite being old. The main reason for its popularity is because it is a fundamental language in the field of computer science. Why Learn C?  It is one of the most popular programming languages in the world  If you know C, you will have no problem learning other popular programming languages such as Java, Python, C++, C#, etc, as the syntax is similar  C is very fast, compared to other programming languages, like Java and Python  C is very versatile; it can be used in both applications and technologies
  • 17. Features of the C language
  • 18. Structure of C program A C program's structure consists of sections for documentation, preprocessor directives, global declarations, the main function, and other functions
  • 19. Files used in a C program
  • 20. Compilers  Compilers in C are programs that translate source code into machine-readable instructions.  Some popular C compilers include Clang, Microsoft Visual C++, and GCC (GNU Compiler Collection)  Compilers are large programs that translate source code written in a high-level language into machine-language instructions. These instructions can be understood by a computer's CPU.
  • 22. Variables in C A variable is a storage location in memory with a specific name and type. It holds values that can change during program execution.
  • 23. Constants in C Constants are read-only values that cannot be modified during the execution of a program. These constants can be of various types, such as integer, floating-point, string, or character constants. They are initialized with the declaration and remain same till the end of the program. #include <stdio.h> int main() { // Defining constant variable const int a = 10; printf("%d", a); return 0; }
  • 24. Input/output statements in C  Input and output operations refer to reading data from external sources and writing data to external destinations outside the program.  C provides a standard set of functions to handle input from the user and output to the screen or to files. These functions are part of the standard input/output library <stdio.h>.  In C, there are many functions used for input and output in different situations but the most commonly used functions for Input/Output are scanf() and printf() respectively.