SlideShare a Scribd company logo
1 of 33
C programming Language
and
Data Structure
BSIS Freshmen – Semi
Final Topic
Compiled and Illustrated by: MJLADO
Language?
Source of Communication between two persons.
– Example: Human –To- Human
OR
Source of Communication between User and
Computer is called programming language.
– Example: Human –To- Machine
Program
Set of instructions which perform any specific
task is called program.
What is programming?
Series of instructions to a computer to achieve a task
Instructions must be written in a way the computer can understand
Programming languages are used to write programs
Once the code (language) of a program has been written, it must be
executed (run, started).
Some programming languages (like C, C++ or Java) require the
code to be compiled (translated to binary) before it can be started.
History of C language
Year Language Developer
1960
ALGOL
(Algorithmic Language)
Internal Committee
1967
BCPL
(Basic Combined Programming Language)
Martin Richards
1970 B Ken Thompson
1972 C Dennis Ritchie
What is C?
C
A language written by Dennis Ritchie in
1972 at AT&T Bell Labs USA. This was to be
the language that UNIX was written in to
become the first "portable" language.
In recent years C has been used as a general-purpose language
because of its popularity with
programmers.
Why C Still Useful?
C provides:
Efficiency, high performance and high quality
Provide functionality through rich set of function libraries
Gateway for other professional languages like C  C++  Java
C is used:
System software, Compilers, Editors
Graphics and Geometry
Databases, operating systems, device drivers
Also used in application programs
Software Development Method
Requirement Specification
– Problem Definition
Analysis
– Refine, Generalize the problem definition
Design
– Develop Algorithm: (A formula or set of steps for solving a particular problem)
Implementation
– Write Code
Verification and Testing
– Test and Debug the code
How do you write a program?
Decide what steps are needed to complete the task
Write the steps (Algorithm) in pseudo code (written in English) or as a
flowchart (graphic symbols)
Translate into the programming language
Try out the program and “debug”.
Sample Pseudo code
Task: add two numbers
Pseudo code (Algorithm) :
1. Start
2. Get two numbers
3. Add them (a + b)
4. Print the answer
5. End
What does a flowchart look like?
Pseudo code (Algorithm)
:
1. Start
2. Get two numbers
3. Add them (A + B)
4. Print the answer
5. End
Start
Get 2 numbers
A+B
Print answer
End
START/END
INPUT/OUTPUT
PROCESS
DECISION
Flow Chart symbols
Integrated Development Environments
An integrated development environment (IDE) is a software package that
makes it possible to edit, compile, link, execute, and debug a program without
leaving the environment.
13
Simple C Program
/* A first C Program*/
#include <stdio.h>
#include <conio.h>
void main()
{
clrscr();
printf("Hello World");
getch();
}
Simple C Program
/* A first C Program*/
#include <stdio.h>
#include <conio.h>
void main()
{
clrscr();
printf("Hello World");
getch();
}
Header File
Main Function
Opening bracket
Statement Part
Closing Bracket
Preprocessor directive
Clear Data
Get the Data
Simple C Program
Line 1: #include <stdio.h> and #include <conio.h>
As part of compilation, the C compiler runs a program called the C
preprocessor. The preprocessor is able to add and remove code
from your source file.
In this case, the directive #include tells the preprocessor to include
code from the file stdio.h and conio.h.
This file contains declarations for functions that the program needs
to use. A declaration for the printf function is in this file.
Simple C Program
Line 2: void main()
This statement declares the main function.
A C program can contain many functions but must always have one
main function.
A function is a self-contained module of code that can finish some
task.
The "void" specifies the return type of main. In this case, nothing is
returned to the operating system.
Simple C Program
Line 3: {
This opening bracket denotes the start of the program.
Simple C Program
Line 4: clrscr();
This will allow the program to avoid data redunduncy.
Simple C Program
Line 5: printf("Hello World ");
Printf is a function from a standard C library that is used to print
strings to the standard output, normally your screen.
The compiler links code from these standard libraries to the code
you have written to produce the final executable.
If there were another printf in this program, its string would print on
the next line.
Simple C Program
Line 6: getch();
This will allow the program to get the data from the given
instructions.
Simple C Program
Line 7: }
This closing bracket denotes the end of the program.
Comment
Comment should be enclosed between /* */
It is used to increase the readability of the program.
Any number of comments can be given at any place in the
program.
example:
/* A first C Program*/
Steps in learning English language
Steps in learning C
Alphabets
Digits
Special-symbols
Constants
Variables
Keywords
Instruction Program
Getting started with C
Alphabets Sentences ParagraphWords
The C character Set
• A character denotes any alphabet, digit or
special symbol used to represent information.
Alphabets A,B, …. ,Y, Z
a,b, ….. ,y, z
Digits 0,1,2,3,4,5,6,7,8,9
Special Symbols ~ ‘ ! @ # % ^ & * ( ) _ - + =
|  { } [ ] : ; “ ‘ < > , . ? /
Constants, Variable and keywords
The alphabets, numbers and special symbol when properly
combined form constants, variables and keywords
A constant is a quantity that doesn’t change
A variable is a name given to the location in memory where
the constant is stored
Example: 3x + y = 20
3 & 20 are constants, which cannot change
x & y can vary or change hence are called variables
Keywords
• Keywords are the words whose meaning has already been
explained to the C compiler
• Sometimes called reserved words.
• They cannot be used as variable names.
• There are only 32 keywords available in c
auto double if static do
break else int struct goto
case enum long switch signed
char extern near typedef while
const float register union default
continue far return unsigned for
short void
Escape Sequence
Certain non printing characters can be expressed in terms of escape
sequences
n new line
t tab
a alert
 backslash
” double quote
0 Null
b Backspace
Data Types
• C Supports several different types of data, each of
which may be represented differently within the
computers memory.
• Basic data types are listed below:
Data Type Description Typical Memory
int integer quantity 2 bytes
char single character 1 bytes
float floating point number 4 bytes
Escape Sequences in C
Certain non printing characters can be expressed in terms of escape
sequences
Character Escape Sequence
bell a
backspace b
horizontal tab t
vertical tab v
newline n
carriage return r
quotation mark (“) ”
question mark(?) ?
backslash () 
null 0
Development with C
Four stages
 Editing: Writing the source code by using some IDE or editor
 Preprocessing or libraries: Already available routines
 compiling: translates or converts source to object code for a specific platform
source code -> object code
– linking: The object code of a program is linked with libraries that are needed
for execution of a program. The linker is used to link the program with libraries.
It creates a file with '*.exe' extension.
Program Development
Source File
Program Object Code File
Executable File
Preprocessor
Modified Source Code in RAM
Compiler
Linker
Editor
Keywords
Sometimes called reserved words.
Are defined as a part of the C language.
Can not be used for anything else!
32 keywords in C
Examples:
– Int
– void
– while
– for

More Related Content

What's hot

Introduction of c programming
Introduction of c programmingIntroduction of c programming
Introduction of c programmingTarun Sharma
 
Complete C programming Language Course
Complete C programming Language CourseComplete C programming Language Course
Complete C programming Language CourseVivek chan
 
pdf c programming language.pdf
pdf c programming language.pdfpdf c programming language.pdf
pdf c programming language.pdfVineethReddy560178
 
Basic structure of C++ program
Basic structure of C++ programBasic structure of C++ program
Basic structure of C++ programmatiur rahman
 
C programming - String
C programming - StringC programming - String
C programming - StringAchyut Devkota
 
Introduction to c programming language
Introduction to c programming languageIntroduction to c programming language
Introduction to c programming languagesanjay joshi
 
Types of Programming Errors
Types of Programming ErrorsTypes of Programming Errors
Types of Programming ErrorsNeha Sharma
 
C++ Programming Language
C++ Programming Language C++ Programming Language
C++ Programming Language Mohamed Loey
 
Basic array in c programming
Basic array in c programmingBasic array in c programming
Basic array in c programmingSajid Hasan
 
Integrated Development Environments (IDE)
Integrated Development Environments (IDE) Integrated Development Environments (IDE)
Integrated Development Environments (IDE) SeanPereira2
 
VTU 18CPS13/23 CPPS module-1 PPT
VTU 18CPS13/23 CPPS module-1 PPTVTU 18CPS13/23 CPPS module-1 PPT
VTU 18CPS13/23 CPPS module-1 PPTgirishmantha
 
Programming flowcharts for C Language
Programming flowcharts for C LanguageProgramming flowcharts for C Language
Programming flowcharts for C LanguageAryan Ajmer
 
Programming in C Presentation upto FILE
Programming in C Presentation upto FILEProgramming in C Presentation upto FILE
Programming in C Presentation upto FILEDipta Saha
 
Let us c(by yashwant kanetkar) chapter 2 solution
Let us c(by yashwant kanetkar) chapter 2 solutionLet us c(by yashwant kanetkar) chapter 2 solution
Let us c(by yashwant kanetkar) chapter 2 solutionrohit kumar
 
C data type format specifier
C data type format specifierC data type format specifier
C data type format specifierSandip Sitäulä
 
Programming in C Basics
Programming in C BasicsProgramming in C Basics
Programming in C BasicsBharat Kalia
 

What's hot (20)

Introduction of c programming
Introduction of c programmingIntroduction of c programming
Introduction of c programming
 
Complete C programming Language Course
Complete C programming Language CourseComplete C programming Language Course
Complete C programming Language Course
 
pdf c programming language.pdf
pdf c programming language.pdfpdf c programming language.pdf
pdf c programming language.pdf
 
Basic structure of C++ program
Basic structure of C++ programBasic structure of C++ program
Basic structure of C++ program
 
C programming - String
C programming - StringC programming - String
C programming - String
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
Introduction to c programming language
Introduction to c programming languageIntroduction to c programming language
Introduction to c programming language
 
Types of Programming Errors
Types of Programming ErrorsTypes of Programming Errors
Types of Programming Errors
 
C++ Programming Language
C++ Programming Language C++ Programming Language
C++ Programming Language
 
Introduction to c++
Introduction to c++Introduction to c++
Introduction to c++
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Basic array in c programming
Basic array in c programmingBasic array in c programming
Basic array in c programming
 
Integrated Development Environments (IDE)
Integrated Development Environments (IDE) Integrated Development Environments (IDE)
Integrated Development Environments (IDE)
 
VTU 18CPS13/23 CPPS module-1 PPT
VTU 18CPS13/23 CPPS module-1 PPTVTU 18CPS13/23 CPPS module-1 PPT
VTU 18CPS13/23 CPPS module-1 PPT
 
Programming flowcharts for C Language
Programming flowcharts for C LanguageProgramming flowcharts for C Language
Programming flowcharts for C Language
 
Diff between c and c++
Diff between c and c++Diff between c and c++
Diff between c and c++
 
Programming in C Presentation upto FILE
Programming in C Presentation upto FILEProgramming in C Presentation upto FILE
Programming in C Presentation upto FILE
 
Let us c(by yashwant kanetkar) chapter 2 solution
Let us c(by yashwant kanetkar) chapter 2 solutionLet us c(by yashwant kanetkar) chapter 2 solution
Let us c(by yashwant kanetkar) chapter 2 solution
 
C data type format specifier
C data type format specifierC data type format specifier
C data type format specifier
 
Programming in C Basics
Programming in C BasicsProgramming in C Basics
Programming in C Basics
 

Similar to What is turbo c and how it works

Introduction of c language
Introduction of c languageIntroduction of c language
Introduction of c languagefarishah
 
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
 
Chapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptxChapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptxAbdalla536859
 
C programming slide day 01 uploadd by md abdullah al shakil
C programming slide day 01 uploadd by md abdullah al shakilC programming slide day 01 uploadd by md abdullah al shakil
C programming slide day 01 uploadd by md abdullah al shakilZenith SVG
 
C programming presentation(final)
C programming presentation(final)C programming presentation(final)
C programming presentation(final)aaravSingh41
 
Unit 1 c - all topics
Unit 1   c - all topicsUnit 1   c - all topics
Unit 1 c - all topicsveningstonk
 
introduction to c programming language
introduction to c programming languageintroduction to c programming language
introduction to c programming languagesanjay joshi
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programmingAlpana Gupta
 
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].pptxCoolGamer16
 
cmp104 lec 8
cmp104 lec 8cmp104 lec 8
cmp104 lec 8kapil078
 

Similar to What is turbo c and how it works (20)

Introduction of c language
Introduction of c languageIntroduction of c language
Introduction of c language
 
C_Intro.ppt
C_Intro.pptC_Intro.ppt
C_Intro.ppt
 
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
 
C language
C languageC language
C language
 
Chapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptxChapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptx
 
C PROGRAMMING
C PROGRAMMINGC PROGRAMMING
C PROGRAMMING
 
C programming slide day 01 uploadd by md abdullah al shakil
C programming slide day 01 uploadd by md abdullah al shakilC programming slide day 01 uploadd by md abdullah al shakil
C programming slide day 01 uploadd by md abdullah al shakil
 
C intro
C introC intro
C intro
 
C programming presentation(final)
C programming presentation(final)C programming presentation(final)
C programming presentation(final)
 
Unit 1 c - all topics
Unit 1   c - all topicsUnit 1   c - all topics
Unit 1 c - all topics
 
Introduction to c language
Introduction to c language Introduction to c language
Introduction to c language
 
C language tutorial
C language tutorialC language tutorial
C language tutorial
 
introduction to c programming language
introduction to c programming languageintroduction to c programming language
introduction to c programming language
 
Lesson 1
Lesson 1Lesson 1
Lesson 1
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
The basics of c programming
The basics of c programmingThe basics of c programming
The basics of c programming
 
Chapter1.pptx
Chapter1.pptxChapter1.pptx
Chapter1.pptx
 
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
 
cmp104 lec 8
cmp104 lec 8cmp104 lec 8
cmp104 lec 8
 
C notes.pdf
C notes.pdfC notes.pdf
C notes.pdf
 

More from Mark John Lado, MIT

Exploring Parts of Speech, Creating Strong Objectives, and Choosing the Right...
Exploring Parts of Speech, Creating Strong Objectives, and Choosing the Right...Exploring Parts of Speech, Creating Strong Objectives, and Choosing the Right...
Exploring Parts of Speech, Creating Strong Objectives, and Choosing the Right...Mark John Lado, MIT
 
Optimizing Embedded System Device Communication with Network Topology Design
Optimizing Embedded System Device Communication with Network Topology DesignOptimizing Embedded System Device Communication with Network Topology Design
Optimizing Embedded System Device Communication with Network Topology DesignMark John Lado, MIT
 
Embedded Systems IO Peripherals Wireless Communication.pdf
Embedded Systems IO Peripherals Wireless Communication.pdfEmbedded Systems IO Peripherals Wireless Communication.pdf
Embedded Systems IO Peripherals Wireless Communication.pdfMark John Lado, MIT
 
Implementing the 6S Lean Methodology for Streamlined Computer System Maintena...
Implementing the 6S Lean Methodology for Streamlined Computer System Maintena...Implementing the 6S Lean Methodology for Streamlined Computer System Maintena...
Implementing the 6S Lean Methodology for Streamlined Computer System Maintena...Mark John Lado, MIT
 
ISO IEC 25010 2011 Systems and Software Quality Requirements and Evaluation S...
ISO IEC 25010 2011 Systems and Software Quality Requirements and Evaluation S...ISO IEC 25010 2011 Systems and Software Quality Requirements and Evaluation S...
ISO IEC 25010 2011 Systems and Software Quality Requirements and Evaluation S...Mark John Lado, MIT
 
4 Module - Operating Systems Configuration and Use by Mark John Lado
4 Module - Operating Systems Configuration and Use by Mark John Lado4 Module - Operating Systems Configuration and Use by Mark John Lado
4 Module - Operating Systems Configuration and Use by Mark John LadoMark John Lado, MIT
 
3 Module - Operating Systems Configuration and Use by Mark John Lado
3 Module - Operating Systems Configuration and Use by Mark John Lado3 Module - Operating Systems Configuration and Use by Mark John Lado
3 Module - Operating Systems Configuration and Use by Mark John LadoMark John Lado, MIT
 
1 Module - Operating Systems Configuration and Use by Mark John Lado
1 Module - Operating Systems Configuration and Use by Mark John Lado1 Module - Operating Systems Configuration and Use by Mark John Lado
1 Module - Operating Systems Configuration and Use by Mark John LadoMark John Lado, MIT
 
2 Module - Operating Systems Configuration and Use by Mark John Lado
2 Module - Operating Systems Configuration and Use by Mark John Lado2 Module - Operating Systems Configuration and Use by Mark John Lado
2 Module - Operating Systems Configuration and Use by Mark John LadoMark John Lado, MIT
 
PART 1 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 1 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...PART 1 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 1 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...Mark John Lado, MIT
 
PART 2 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 2 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...PART 2 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 2 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...Mark John Lado, MIT
 
PART 3 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 3 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...PART 3 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 3 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...Mark John Lado, MIT
 
Dart Programming Language by Mark John Lado
Dart Programming Language by Mark John LadoDart Programming Language by Mark John Lado
Dart Programming Language by Mark John LadoMark John Lado, MIT
 
Computer hacking and security - Social Responsibility of IT Professional by M...
Computer hacking and security - Social Responsibility of IT Professional by M...Computer hacking and security - Social Responsibility of IT Professional by M...
Computer hacking and security - Social Responsibility of IT Professional by M...Mark John Lado, MIT
 
A WIRELESS DIGITAL PUBLIC ADDRESS WITH VOICE ALARM AND TEXT-TO-SPEECH FEATURE...
A WIRELESS DIGITAL PUBLIC ADDRESS WITH VOICE ALARM AND TEXT-TO-SPEECH FEATURE...A WIRELESS DIGITAL PUBLIC ADDRESS WITH VOICE ALARM AND TEXT-TO-SPEECH FEATURE...
A WIRELESS DIGITAL PUBLIC ADDRESS WITH VOICE ALARM AND TEXT-TO-SPEECH FEATURE...Mark John Lado, MIT
 
IT Security and Management - Semi Finals by Mark John Lado
IT Security and Management - Semi Finals by Mark John LadoIT Security and Management - Semi Finals by Mark John Lado
IT Security and Management - Semi Finals by Mark John LadoMark John Lado, MIT
 
IT Security and Management - Security Policies
IT Security and Management - Security PoliciesIT Security and Management - Security Policies
IT Security and Management - Security PoliciesMark John Lado, MIT
 
Systems Administration - MARK JOHN LADO
Systems Administration - MARK JOHN LADOSystems Administration - MARK JOHN LADO
Systems Administration - MARK JOHN LADOMark John Lado, MIT
 
IT Security and Management - Prelim Lessons by Mark John Lado
IT Security and Management - Prelim Lessons by Mark John LadoIT Security and Management - Prelim Lessons by Mark John Lado
IT Security and Management - Prelim Lessons by Mark John LadoMark John Lado, MIT
 

More from Mark John Lado, MIT (20)

Exploring Parts of Speech, Creating Strong Objectives, and Choosing the Right...
Exploring Parts of Speech, Creating Strong Objectives, and Choosing the Right...Exploring Parts of Speech, Creating Strong Objectives, and Choosing the Right...
Exploring Parts of Speech, Creating Strong Objectives, and Choosing the Right...
 
Optimizing Embedded System Device Communication with Network Topology Design
Optimizing Embedded System Device Communication with Network Topology DesignOptimizing Embedded System Device Communication with Network Topology Design
Optimizing Embedded System Device Communication with Network Topology Design
 
Embedded Systems IO Peripherals Wireless Communication.pdf
Embedded Systems IO Peripherals Wireless Communication.pdfEmbedded Systems IO Peripherals Wireless Communication.pdf
Embedded Systems IO Peripherals Wireless Communication.pdf
 
Implementing the 6S Lean Methodology for Streamlined Computer System Maintena...
Implementing the 6S Lean Methodology for Streamlined Computer System Maintena...Implementing the 6S Lean Methodology for Streamlined Computer System Maintena...
Implementing the 6S Lean Methodology for Streamlined Computer System Maintena...
 
ISO IEC 25010 2011 Systems and Software Quality Requirements and Evaluation S...
ISO IEC 25010 2011 Systems and Software Quality Requirements and Evaluation S...ISO IEC 25010 2011 Systems and Software Quality Requirements and Evaluation S...
ISO IEC 25010 2011 Systems and Software Quality Requirements and Evaluation S...
 
4 Module - Operating Systems Configuration and Use by Mark John Lado
4 Module - Operating Systems Configuration and Use by Mark John Lado4 Module - Operating Systems Configuration and Use by Mark John Lado
4 Module - Operating Systems Configuration and Use by Mark John Lado
 
3 Module - Operating Systems Configuration and Use by Mark John Lado
3 Module - Operating Systems Configuration and Use by Mark John Lado3 Module - Operating Systems Configuration and Use by Mark John Lado
3 Module - Operating Systems Configuration and Use by Mark John Lado
 
1 Module - Operating Systems Configuration and Use by Mark John Lado
1 Module - Operating Systems Configuration and Use by Mark John Lado1 Module - Operating Systems Configuration and Use by Mark John Lado
1 Module - Operating Systems Configuration and Use by Mark John Lado
 
2 Module - Operating Systems Configuration and Use by Mark John Lado
2 Module - Operating Systems Configuration and Use by Mark John Lado2 Module - Operating Systems Configuration and Use by Mark John Lado
2 Module - Operating Systems Configuration and Use by Mark John Lado
 
PART 1 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 1 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...PART 1 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 1 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
 
PART 2 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 2 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...PART 2 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 2 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
 
PART 3 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 3 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...PART 3 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
PART 3 CT-318-Microprocessor-Systems Lesson 3 - LED Display by Mark John Lado...
 
Dart Programming Language by Mark John Lado
Dart Programming Language by Mark John LadoDart Programming Language by Mark John Lado
Dart Programming Language by Mark John Lado
 
What is CRUD in TPS?
What is CRUD in TPS?What is CRUD in TPS?
What is CRUD in TPS?
 
Computer hacking and security - Social Responsibility of IT Professional by M...
Computer hacking and security - Social Responsibility of IT Professional by M...Computer hacking and security - Social Responsibility of IT Professional by M...
Computer hacking and security - Social Responsibility of IT Professional by M...
 
A WIRELESS DIGITAL PUBLIC ADDRESS WITH VOICE ALARM AND TEXT-TO-SPEECH FEATURE...
A WIRELESS DIGITAL PUBLIC ADDRESS WITH VOICE ALARM AND TEXT-TO-SPEECH FEATURE...A WIRELESS DIGITAL PUBLIC ADDRESS WITH VOICE ALARM AND TEXT-TO-SPEECH FEATURE...
A WIRELESS DIGITAL PUBLIC ADDRESS WITH VOICE ALARM AND TEXT-TO-SPEECH FEATURE...
 
IT Security and Management - Semi Finals by Mark John Lado
IT Security and Management - Semi Finals by Mark John LadoIT Security and Management - Semi Finals by Mark John Lado
IT Security and Management - Semi Finals by Mark John Lado
 
IT Security and Management - Security Policies
IT Security and Management - Security PoliciesIT Security and Management - Security Policies
IT Security and Management - Security Policies
 
Systems Administration - MARK JOHN LADO
Systems Administration - MARK JOHN LADOSystems Administration - MARK JOHN LADO
Systems Administration - MARK JOHN LADO
 
IT Security and Management - Prelim Lessons by Mark John Lado
IT Security and Management - Prelim Lessons by Mark John LadoIT Security and Management - Prelim Lessons by Mark John Lado
IT Security and Management - Prelim Lessons by Mark John Lado
 

Recently uploaded

mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
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
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
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
 
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
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 

Recently uploaded (20)

mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
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
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
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...
 
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
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 

What is turbo c and how it works

  • 1. C programming Language and Data Structure BSIS Freshmen – Semi Final Topic Compiled and Illustrated by: MJLADO
  • 2. Language? Source of Communication between two persons. – Example: Human –To- Human OR Source of Communication between User and Computer is called programming language. – Example: Human –To- Machine
  • 3. Program Set of instructions which perform any specific task is called program.
  • 4. What is programming? Series of instructions to a computer to achieve a task Instructions must be written in a way the computer can understand Programming languages are used to write programs Once the code (language) of a program has been written, it must be executed (run, started). Some programming languages (like C, C++ or Java) require the code to be compiled (translated to binary) before it can be started.
  • 5. History of C language Year Language Developer 1960 ALGOL (Algorithmic Language) Internal Committee 1967 BCPL (Basic Combined Programming Language) Martin Richards 1970 B Ken Thompson 1972 C Dennis Ritchie
  • 6. What is C? C A language written by Dennis Ritchie in 1972 at AT&T Bell Labs USA. This was to be the language that UNIX was written in to become the first "portable" language. In recent years C has been used as a general-purpose language because of its popularity with programmers.
  • 7. Why C Still Useful? C provides: Efficiency, high performance and high quality Provide functionality through rich set of function libraries Gateway for other professional languages like C  C++  Java C is used: System software, Compilers, Editors Graphics and Geometry Databases, operating systems, device drivers Also used in application programs
  • 8. Software Development Method Requirement Specification – Problem Definition Analysis – Refine, Generalize the problem definition Design – Develop Algorithm: (A formula or set of steps for solving a particular problem) Implementation – Write Code Verification and Testing – Test and Debug the code
  • 9. How do you write a program? Decide what steps are needed to complete the task Write the steps (Algorithm) in pseudo code (written in English) or as a flowchart (graphic symbols) Translate into the programming language Try out the program and “debug”.
  • 10. Sample Pseudo code Task: add two numbers Pseudo code (Algorithm) : 1. Start 2. Get two numbers 3. Add them (a + b) 4. Print the answer 5. End
  • 11. What does a flowchart look like? Pseudo code (Algorithm) : 1. Start 2. Get two numbers 3. Add them (A + B) 4. Print the answer 5. End Start Get 2 numbers A+B Print answer End
  • 13. Integrated Development Environments An integrated development environment (IDE) is a software package that makes it possible to edit, compile, link, execute, and debug a program without leaving the environment. 13
  • 14. Simple C Program /* A first C Program*/ #include <stdio.h> #include <conio.h> void main() { clrscr(); printf("Hello World"); getch(); }
  • 15. Simple C Program /* A first C Program*/ #include <stdio.h> #include <conio.h> void main() { clrscr(); printf("Hello World"); getch(); } Header File Main Function Opening bracket Statement Part Closing Bracket Preprocessor directive Clear Data Get the Data
  • 16. Simple C Program Line 1: #include <stdio.h> and #include <conio.h> As part of compilation, the C compiler runs a program called the C preprocessor. The preprocessor is able to add and remove code from your source file. In this case, the directive #include tells the preprocessor to include code from the file stdio.h and conio.h. This file contains declarations for functions that the program needs to use. A declaration for the printf function is in this file.
  • 17. Simple C Program Line 2: void main() This statement declares the main function. A C program can contain many functions but must always have one main function. A function is a self-contained module of code that can finish some task. The "void" specifies the return type of main. In this case, nothing is returned to the operating system.
  • 18. Simple C Program Line 3: { This opening bracket denotes the start of the program.
  • 19. Simple C Program Line 4: clrscr(); This will allow the program to avoid data redunduncy.
  • 20. Simple C Program Line 5: printf("Hello World "); Printf is a function from a standard C library that is used to print strings to the standard output, normally your screen. The compiler links code from these standard libraries to the code you have written to produce the final executable. If there were another printf in this program, its string would print on the next line.
  • 21. Simple C Program Line 6: getch(); This will allow the program to get the data from the given instructions.
  • 22. Simple C Program Line 7: } This closing bracket denotes the end of the program.
  • 23. Comment Comment should be enclosed between /* */ It is used to increase the readability of the program. Any number of comments can be given at any place in the program. example: /* A first C Program*/
  • 24. Steps in learning English language Steps in learning C Alphabets Digits Special-symbols Constants Variables Keywords Instruction Program Getting started with C Alphabets Sentences ParagraphWords
  • 25. The C character Set • A character denotes any alphabet, digit or special symbol used to represent information. Alphabets A,B, …. ,Y, Z a,b, ….. ,y, z Digits 0,1,2,3,4,5,6,7,8,9 Special Symbols ~ ‘ ! @ # % ^ & * ( ) _ - + = | { } [ ] : ; “ ‘ < > , . ? /
  • 26. Constants, Variable and keywords The alphabets, numbers and special symbol when properly combined form constants, variables and keywords A constant is a quantity that doesn’t change A variable is a name given to the location in memory where the constant is stored Example: 3x + y = 20 3 & 20 are constants, which cannot change x & y can vary or change hence are called variables
  • 27. Keywords • Keywords are the words whose meaning has already been explained to the C compiler • Sometimes called reserved words. • They cannot be used as variable names. • There are only 32 keywords available in c auto double if static do break else int struct goto case enum long switch signed char extern near typedef while const float register union default continue far return unsigned for short void
  • 28. Escape Sequence Certain non printing characters can be expressed in terms of escape sequences n new line t tab a alert backslash ” double quote 0 Null b Backspace
  • 29. Data Types • C Supports several different types of data, each of which may be represented differently within the computers memory. • Basic data types are listed below: Data Type Description Typical Memory int integer quantity 2 bytes char single character 1 bytes float floating point number 4 bytes
  • 30. Escape Sequences in C Certain non printing characters can be expressed in terms of escape sequences Character Escape Sequence bell a backspace b horizontal tab t vertical tab v newline n carriage return r quotation mark (“) ” question mark(?) ? backslash () null 0
  • 31. Development with C Four stages  Editing: Writing the source code by using some IDE or editor  Preprocessing or libraries: Already available routines  compiling: translates or converts source to object code for a specific platform source code -> object code – linking: The object code of a program is linked with libraries that are needed for execution of a program. The linker is used to link the program with libraries. It creates a file with '*.exe' extension.
  • 32. Program Development Source File Program Object Code File Executable File Preprocessor Modified Source Code in RAM Compiler Linker Editor
  • 33. Keywords Sometimes called reserved words. Are defined as a part of the C language. Can not be used for anything else! 32 keywords in C Examples: – Int – void – while – for

Editor's Notes

  1. Comment about the program should be enclosed within /* */ nested comments eg /* to calculate the simple interest /* compound interest */ */ is invalid comment can be split over more than one line eg /* to calculate the simple interest and the compound interest */ This comment statements will be ignored by the compiler while compiling the program, i.e this comment statement won’t be converted to object code.
  2. A constant is a quantity that doesn’t change. This quantity can be stored at a locations in the memory of the computer. Eg 3x + y = 20 3 &amp; 20 are constants, which cannot change x &amp; y can vary or change hence are called variables