SlideShare a Scribd company logo
1 of 8
Download to read offline
PROGRAMMING USING
C LANGUAGE
BY: MOSTAFA ALI
HISTORY OF C LANGUAGE
• C language implemented by Dennis Ritchie in 1970 as a development process
of Blanguage.
• C89 Standard or ANSI C (American National Standards Institute) implemented
on 1989.
• ISO (International Standard Organization) implemented on 1990 or called.
• C99 Standard implemented on 1999 and it’s a quit different of previous
Versions.
2015All Copyrights Reserved © Mostafa Ali 1
WHY USE C
• C language is a Middle-level language so it’s easy to Compile and easy to
Understand by the Programmer.
• High Portability, High Protection and Much Higher Efficiency (how to use least
resources as possible).
• C89 Standard has 32 Words and this standard what we are going to study.
• The C language is a Subset of C++.
2015
All Copyrights Reserved © Mostafa Ali
2
C-PROGRAMMING LIFE-CYCLE [1]
• Life-Cycle Means the process that takes starting from writing the code to
reach the executable (running) file.
• Source code(*.c): text of the program that you can read (input to Compiler).
• Object code(*.o): transformation from source code to machine code (input to
Linker).
• Linker: a program that links separately compiled modules into one program, It
also combines the functions in the standard C library with the code that you
wrote (the output of the linker is an executable file).
2015
All Copyrights Reserved © Mostafa Ali
3
C-PROGRAMMING LIFE-CYCLE [2]
• Linker Script or Linker Directive (ld): The ld command language is a collection
of statements; some are simple keywords setting a particular option, some
are used to select and group input files or name output files; and two
statement types have a fundamental and high impact on the linking process.
• The most fundamental command is the SECTIONS command . Every
meaningful command script must have a SECTIONS command: it specifies a
"picture" of the output file's layout.
• The MEMORY command complements SECTIONS by describing the available
memory in the target architecture. This command is optional; if you don't use
a MEMORY command, ld assumes sufficient memory is available in a
contiguous block for all output.
2015
All Copyrights Reserved © Mostafa Ali
4
C-PROGRAMMING LIFE-CYCLE [3]
2015
All Copyrights Reserved © Mostafa Ali
5
• Library: the file containing the standard functions that your program can use.
• Mapping: is a map of how the memory section dividing according to what was
written on “ld”.
• Compile Time: the time that the program is being Compiled.
• Run Time: the time that the program is Excuted.
Linker
File.exe, File.hex (Executable File) File.map(Mapping File)
Assembler
File.o (Object File)
Compiler
File.s (Assembly File)
Preprocessor
File.i, File.pre (Extended Source Code File)
Editor
File.c File.h
2015
All Copyrights Reserved © Mostafa Ali
6
ld(LinkerDirective)+
OtherObjectFiles+
LibraryFiles
DATA TYPES IN C [1]
Data Type Size In Bits Size in Bytes Range
char 8 1 S -(27-1):(27-1)
US 0:(28-1)
short int 16 2 S -(215-1):(215-1)
US 0:(216-1)
long int 32 4 S -(231-1):(231-1)
US 0:(232-1)
float 32 4 S -(231-1):(231-1)
US 0:(232-1)
double 64 8 S -(263-1):(263-1)
US 0:(264-1)
long double 80 10 S -(279-1):(279-1)
US 0:(280-1)
long long int (C99) 64 8 S -(263-1):(263-1)
US 0:(264-1)
2015
All Copyrights Reserved © Mostafa Ali
7

More Related Content

What's hot

Different types of Editors in Linux
Different types of Editors in LinuxDifferent types of Editors in Linux
Different types of Editors in LinuxBhavik Trivedi
 
Linux advanced concepts - Part 2
Linux advanced concepts - Part 2Linux advanced concepts - Part 2
Linux advanced concepts - Part 2NAILBITER
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programmingSivant Kolhe
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programmingAlpana Gupta
 
Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...
Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...
Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...GlobalLogic Ukraine
 
A low cost, real-time algorithm for embedded devices based on freertos kernel
A low cost, real-time algorithm for embedded devices based on freertos kernelA low cost, real-time algorithm for embedded devices based on freertos kernel
A low cost, real-time algorithm for embedded devices based on freertos kerneleSAT Journals
 
C programming short notes by pulkit modi
C programming short notes by pulkit modiC programming short notes by pulkit modi
C programming short notes by pulkit modiPulkitmodi1998
 
Command line interface “CLI”
Command line interface “CLI”Command line interface “CLI”
Command line interface “CLI”abochoman
 
.NET Core Blimey! (dotnetsheff Jan 2016)
.NET Core Blimey! (dotnetsheff Jan 2016).NET Core Blimey! (dotnetsheff Jan 2016)
.NET Core Blimey! (dotnetsheff Jan 2016)citizenmatt
 
Parallel language and compiler
Parallel language and compilerParallel language and compiler
Parallel language and compilerSVijaylakshmi
 

What's hot (16)

LLVM Compiler
LLVM CompilerLLVM Compiler
LLVM Compiler
 
Different types of Editors in Linux
Different types of Editors in LinuxDifferent types of Editors in Linux
Different types of Editors in Linux
 
Python programming 2nd
Python programming 2ndPython programming 2nd
Python programming 2nd
 
C compiler-ide
C compiler-ideC compiler-ide
C compiler-ide
 
Linux advanced concepts - Part 2
Linux advanced concepts - Part 2Linux advanced concepts - Part 2
Linux advanced concepts - Part 2
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...
Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...
Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...
 
Eclipse - Installation and quick start guide
Eclipse - Installation and quick start guideEclipse - Installation and quick start guide
Eclipse - Installation and quick start guide
 
A low cost, real-time algorithm for embedded devices based on freertos kernel
A low cost, real-time algorithm for embedded devices based on freertos kernelA low cost, real-time algorithm for embedded devices based on freertos kernel
A low cost, real-time algorithm for embedded devices based on freertos kernel
 
Advanced C
Advanced C Advanced C
Advanced C
 
C programming short notes by pulkit modi
C programming short notes by pulkit modiC programming short notes by pulkit modi
C programming short notes by pulkit modi
 
Command line interface “CLI”
Command line interface “CLI”Command line interface “CLI”
Command line interface “CLI”
 
.NET Core Blimey! (dotnetsheff Jan 2016)
.NET Core Blimey! (dotnetsheff Jan 2016).NET Core Blimey! (dotnetsheff Jan 2016)
.NET Core Blimey! (dotnetsheff Jan 2016)
 
Unit 2 l1
Unit 2 l1Unit 2 l1
Unit 2 l1
 
Parallel language and compiler
Parallel language and compilerParallel language and compiler
Parallel language and compiler
 

Viewers also liked

Understanding Noise Figure
Understanding Noise FigureUnderstanding Noise Figure
Understanding Noise FigureMostafa Ali
 
Understanding noise figure
Understanding noise figureUnderstanding noise figure
Understanding noise figureNiko Glamuzina
 
Noise in communication system
Noise in communication systemNoise in communication system
Noise in communication systemfirdous006
 
Noise 2.0
Noise 2.0Noise 2.0
Noise 2.0bhavyaw
 
Signals and noise
Signals and noiseSignals and noise
Signals and noiseRavi Kant
 
Noise in communication system
Noise in communication systemNoise in communication system
Noise in communication systemfirdous006
 
Noise in Communication System
Noise in Communication SystemNoise in Communication System
Noise in Communication SystemIzah Asmadi
 
Types of Noise (Ch 1)
Types of Noise (Ch 1)Types of Noise (Ch 1)
Types of Noise (Ch 1)drpaullippert
 

Viewers also liked (13)

Understanding Noise Figure
Understanding Noise FigureUnderstanding Noise Figure
Understanding Noise Figure
 
Noise
NoiseNoise
Noise
 
Chapter 5 noise
Chapter 5 noiseChapter 5 noise
Chapter 5 noise
 
Understanding noise figure
Understanding noise figureUnderstanding noise figure
Understanding noise figure
 
5952-3706E
5952-3706E5952-3706E
5952-3706E
 
Noise in communication system
Noise in communication systemNoise in communication system
Noise in communication system
 
Noise 2.0
Noise 2.0Noise 2.0
Noise 2.0
 
Signals and noise
Signals and noiseSignals and noise
Signals and noise
 
Noise
NoiseNoise
Noise
 
Noise
NoiseNoise
Noise
 
Noise in communication system
Noise in communication systemNoise in communication system
Noise in communication system
 
Noise in Communication System
Noise in Communication SystemNoise in Communication System
Noise in Communication System
 
Types of Noise (Ch 1)
Types of Noise (Ch 1)Types of Noise (Ch 1)
Types of Noise (Ch 1)
 

Similar to C Programming[Sample]

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
 
Computer programming - turbo c environment
Computer programming - turbo c environmentComputer programming - turbo c environment
Computer programming - turbo c environmentJohn Paul Espino
 
1. over view and history of c
1. over view and history of c1. over view and history of c
1. over view and history of cHarish Kumawat
 
Understanding C and its Applications.pdf
Understanding C and its Applications.pdfUnderstanding C and its Applications.pdf
Understanding C and its Applications.pdfAdeleHansley
 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programmingMalikaJoya
 
C Programming Lecture 2 - Structure of a C Program.pptx
C Programming Lecture 2 - Structure of a C Program.pptxC Programming Lecture 2 - Structure of a C Program.pptx
C Programming Lecture 2 - Structure of a C Program.pptxMurali M
 
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTREC & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTREjatin batra
 
.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3aminmesbahi
 
Embedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterEmbedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterHossam Hassan
 
Unit 1 introduction to c++.pptx
Unit 1 introduction to c++.pptxUnit 1 introduction to c++.pptx
Unit 1 introduction to c++.pptxshashiden1
 
Programming in c_in_7_days
Programming in c_in_7_daysProgramming in c_in_7_days
Programming in c_in_7_daysAnkit Dubey
 

Similar to C Programming[Sample] (20)

C session 1.pptx
C session 1.pptxC session 1.pptx
C session 1.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
 
Computer programming - turbo c environment
Computer programming - turbo c environmentComputer programming - turbo c environment
Computer programming - turbo c environment
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
1. over view and history of c
1. over view and history of c1. over view and history of c
1. over view and history of c
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
Understanding C and its Applications.pdf
Understanding C and its Applications.pdfUnderstanding C and its Applications.pdf
Understanding C and its Applications.pdf
 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programming
 
C Programming Lecture 2 - Structure of a C Program.pptx
C Programming Lecture 2 - Structure of a C Program.pptxC Programming Lecture 2 - Structure of a C Program.pptx
C Programming Lecture 2 - Structure of a C Program.pptx
 
C programming
C programming C programming
C programming
 
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTREC & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
 
.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3
 
Embedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterEmbedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals master
 
Unit 1 introduction to c++.pptx
Unit 1 introduction to c++.pptxUnit 1 introduction to c++.pptx
Unit 1 introduction to c++.pptx
 
Programming in c_in_7_days
Programming in c_in_7_daysProgramming in c_in_7_days
Programming in c_in_7_days
 
C programming
C programmingC programming
C programming
 
Csc240 -lecture_3
Csc240  -lecture_3Csc240  -lecture_3
Csc240 -lecture_3
 
C programming part1
C programming part1C programming part1
C programming part1
 
C in7-days
C in7-daysC in7-days
C in7-days
 
C in7-days
C in7-daysC in7-days
C in7-days
 

Recently uploaded

What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfIdiosysTechnologies1
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 

Recently uploaded (20)

What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdf
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 

C Programming[Sample]

  • 2. HISTORY OF C LANGUAGE • C language implemented by Dennis Ritchie in 1970 as a development process of Blanguage. • C89 Standard or ANSI C (American National Standards Institute) implemented on 1989. • ISO (International Standard Organization) implemented on 1990 or called. • C99 Standard implemented on 1999 and it’s a quit different of previous Versions. 2015All Copyrights Reserved © Mostafa Ali 1
  • 3. WHY USE C • C language is a Middle-level language so it’s easy to Compile and easy to Understand by the Programmer. • High Portability, High Protection and Much Higher Efficiency (how to use least resources as possible). • C89 Standard has 32 Words and this standard what we are going to study. • The C language is a Subset of C++. 2015 All Copyrights Reserved © Mostafa Ali 2
  • 4. C-PROGRAMMING LIFE-CYCLE [1] • Life-Cycle Means the process that takes starting from writing the code to reach the executable (running) file. • Source code(*.c): text of the program that you can read (input to Compiler). • Object code(*.o): transformation from source code to machine code (input to Linker). • Linker: a program that links separately compiled modules into one program, It also combines the functions in the standard C library with the code that you wrote (the output of the linker is an executable file). 2015 All Copyrights Reserved © Mostafa Ali 3
  • 5. C-PROGRAMMING LIFE-CYCLE [2] • Linker Script or Linker Directive (ld): The ld command language is a collection of statements; some are simple keywords setting a particular option, some are used to select and group input files or name output files; and two statement types have a fundamental and high impact on the linking process. • The most fundamental command is the SECTIONS command . Every meaningful command script must have a SECTIONS command: it specifies a "picture" of the output file's layout. • The MEMORY command complements SECTIONS by describing the available memory in the target architecture. This command is optional; if you don't use a MEMORY command, ld assumes sufficient memory is available in a contiguous block for all output. 2015 All Copyrights Reserved © Mostafa Ali 4
  • 6. C-PROGRAMMING LIFE-CYCLE [3] 2015 All Copyrights Reserved © Mostafa Ali 5 • Library: the file containing the standard functions that your program can use. • Mapping: is a map of how the memory section dividing according to what was written on “ld”. • Compile Time: the time that the program is being Compiled. • Run Time: the time that the program is Excuted.
  • 7. Linker File.exe, File.hex (Executable File) File.map(Mapping File) Assembler File.o (Object File) Compiler File.s (Assembly File) Preprocessor File.i, File.pre (Extended Source Code File) Editor File.c File.h 2015 All Copyrights Reserved © Mostafa Ali 6 ld(LinkerDirective)+ OtherObjectFiles+ LibraryFiles
  • 8. DATA TYPES IN C [1] Data Type Size In Bits Size in Bytes Range char 8 1 S -(27-1):(27-1) US 0:(28-1) short int 16 2 S -(215-1):(215-1) US 0:(216-1) long int 32 4 S -(231-1):(231-1) US 0:(232-1) float 32 4 S -(231-1):(231-1) US 0:(232-1) double 64 8 S -(263-1):(263-1) US 0:(264-1) long double 80 10 S -(279-1):(279-1) US 0:(280-1) long long int (C99) 64 8 S -(263-1):(263-1) US 0:(264-1) 2015 All Copyrights Reserved © Mostafa Ali 7