SlideShare a Scribd company logo
1 of 12
Copyright@Embedkari
C
DAY-1
Copyright@Embedkari
Agenda
• Overview
• Programming Language Concept
• C Program Components
• C Learning Ecosystem
Copyright@Embedkari
Overview
●
Most popular system programming language
●
Developed for UNIX. Linux & MySQL are written in C
●
Nearest to Assembly
●
Install Eclipse IDE from Embedkari Toolbox
–
Text Editor,Compiler,Assemblet,Linker and Debugge
Copyright@Embedkari
Programming Language
●
Program is a set of pre-defined instructions to a device/cpu
●
Lets take an example of normal language we use for communicatiion
–
Mr A ask a fast food person Mr B
–
Give me “one large Pizza”
–
Here Give Me is instruction and rest is data
–
The data itself has three parts
●
Quantity , Size , Item description
–
Mr B has to decode both instruction and data elements, Then act
accordingly. Mr B may also check payment status
–
Mr B is already trained to do the required action
–
Now one can replace Mr B with a ML trained Robot OR A pre-
programmed Vending machine
–
There may be another customer Mr C with different order and item
–
Copyright@Embedkari
Program Components
●
Group of instructions working on data
–
Functions
●
Data can be constant or variable at run time
–
Variables
●
Different kind of data like numbers, characters,strings
etc
–
Data Type
●
Different actions are possible based on the conditions
set for input data
–
Control statements & Expressions
Copyright@Embedkari
Build Process
● C source File
●
● Preprocessor
● Preprocessor
output
●
● Compiler
● Object File
●
● Linker
● Executable
Copyright@Embedkari
Token
●
Token is the smallest element of C program for Compiler
–
Keywords
–
Identifiers
–
Constants
–
Strings
–
Special Symbols
–
Operators
●
Keywords are pre-defined or reserved words
Copyright@Embedkari
Keywords-32
●
Primitive Data Types and related Keywords (8)
–
int long double float short char unsigned signed
●
Custom Data Types Related (3)
–
struct enum typedef
●
Control statements (12)
goto if else do while for
–
return switch case break continue default
●
Storage specifiers(4)
–
auto register static extern
●
Type Qualifiers(2) const volatile
●
Misc(3) : void sizeof union
●
Note: There are some additional reserve words added C99 onwards
–
Copyright@Embedkari
Data Type size @ARM ABI
C Type Machine Type Size
char unsigned byte 1
unsigned char unsigned byte 1
signed char signed byte 1
[signed]short signed halfword 2
unsigned short unsigned halfword 2
[signed] int signed word 4
unsigned int unsigned word 4
[signed] long signed word 4
unsigned long unsigned word 4
[signed] long long signed double-word 8
unsigned long long unsigned double-word 8
float single precision (IEEE 754) 4
double double precision (IEEE 754) 8
Long double double precision (IEEE 754) 8
Copyright@Embedkari
Storage Specifiers
●
auto (default)
–
Local variable with local life time
●
extern or global variable
–
Variable defined outside function will have global scope
●
static
–
Preserve this variable even after its scope ends
●
register,
–
This variable has to be stored in CPU register. Variables used often can
be defined in this category from performance perspective. But keep in
mind the limited cpu registers
●
Copyright@Embedkari
Exercise : Data Types and Storage
Classifiers
●
Define variables based on different storage classifiers and data type
●
Check size of data type defined
●
Check default initial value and memory location of different storage
classifiers
●
#include <stdio.h> //Pre-processor
//This is First C Program
–
int main() {
–
printf("Hello, World! n"); //printf() function
–
return 0;
–
}
●
Copyright@Embedkari
THANKS
If you found this information usefule < Please
like this video AND subscribe to
www.youtube.com/c/embedkari
Embedded Career Information :
www.facebook.com/embedkari
Blog:www.embedkari.com

More Related Content

Similar to Learn C day1 @https://youtu.be/NeGCA8ruvww

67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf
Rajb54
 
System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1
Manoj Patil
 
FPL - Part 1 (Sem - I 2013 )
FPL - Part 1  (Sem - I  2013 ) FPL - Part 1  (Sem - I  2013 )
FPL - Part 1 (Sem - I 2013 )
Yogesh Deshpande
 
Embedded programming Embedded programming (1).pptx
Embedded programming Embedded programming (1).pptxEmbedded programming Embedded programming (1).pptx
Embedded programming Embedded programming (1).pptx
lematadese670
 

Similar to Learn C day1 @https://youtu.be/NeGCA8ruvww (20)

Embedded _c_
Embedded  _c_Embedded  _c_
Embedded _c_
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Computer Programming In C.pptx
Computer Programming In C.pptxComputer Programming In C.pptx
Computer Programming In C.pptx
 
EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...
EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...
EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...
 
cs8251 unit 1 ppt
cs8251 unit 1 pptcs8251 unit 1 ppt
cs8251 unit 1 ppt
 
E.s unit 6
E.s unit 6E.s unit 6
E.s unit 6
 
JIT Compiler
JIT CompilerJIT Compiler
JIT Compiler
 
Practical C++ Generative Programming
Practical C++ Generative ProgrammingPractical C++ Generative Programming
Practical C++ Generative Programming
 
67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf
 
Storage classes, linkage & memory management
Storage classes, linkage & memory managementStorage classes, linkage & memory management
Storage classes, linkage & memory management
 
INTRODUCTION TO C PROGRAMMING in basic c language
INTRODUCTION TO C PROGRAMMING in basic c languageINTRODUCTION TO C PROGRAMMING in basic c language
INTRODUCTION TO C PROGRAMMING in basic c language
 
System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1
 
FPL - Part 1 (Sem - I 2013 )
FPL - Part 1  (Sem - I  2013 ) FPL - Part 1  (Sem - I  2013 )
FPL - Part 1 (Sem - I 2013 )
 
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT IV Designing Embedded System with 8051...
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT IV  Designing Embedded System with 8051...SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT IV  Designing Embedded System with 8051...
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT IV Designing Embedded System with 8051...
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best Practices
 
Compiler design
Compiler designCompiler design
Compiler design
 
Embedded programming Embedded programming (1).pptx
Embedded programming Embedded programming (1).pptxEmbedded programming Embedded programming (1).pptx
Embedded programming Embedded programming (1).pptx
 
C programming session9 -
C programming  session9 -C programming  session9 -
C programming session9 -
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best Practices
 
embeddedsystems-100429081552-phpapp01.pdf
embeddedsystems-100429081552-phpapp01.pdfembeddedsystems-100429081552-phpapp01.pdf
embeddedsystems-100429081552-phpapp01.pdf
 

Recently uploaded

SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
Peter Brusilovsky
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MysoreMuleSoftMeetup
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
中 央社
 

Recently uploaded (20)

SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
Rich Dad Poor Dad ( PDFDrive.com )--.pdf
Rich Dad Poor Dad ( PDFDrive.com )--.pdfRich Dad Poor Dad ( PDFDrive.com )--.pdf
Rich Dad Poor Dad ( PDFDrive.com )--.pdf
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 

Learn C day1 @https://youtu.be/NeGCA8ruvww

  • 2. Copyright@Embedkari Agenda • Overview • Programming Language Concept • C Program Components • C Learning Ecosystem
  • 3. Copyright@Embedkari Overview ● Most popular system programming language ● Developed for UNIX. Linux & MySQL are written in C ● Nearest to Assembly ● Install Eclipse IDE from Embedkari Toolbox – Text Editor,Compiler,Assemblet,Linker and Debugge
  • 4. Copyright@Embedkari Programming Language ● Program is a set of pre-defined instructions to a device/cpu ● Lets take an example of normal language we use for communicatiion – Mr A ask a fast food person Mr B – Give me “one large Pizza” – Here Give Me is instruction and rest is data – The data itself has three parts ● Quantity , Size , Item description – Mr B has to decode both instruction and data elements, Then act accordingly. Mr B may also check payment status – Mr B is already trained to do the required action – Now one can replace Mr B with a ML trained Robot OR A pre- programmed Vending machine – There may be another customer Mr C with different order and item –
  • 5. Copyright@Embedkari Program Components ● Group of instructions working on data – Functions ● Data can be constant or variable at run time – Variables ● Different kind of data like numbers, characters,strings etc – Data Type ● Different actions are possible based on the conditions set for input data – Control statements & Expressions
  • 6. Copyright@Embedkari Build Process ● C source File ● ● Preprocessor ● Preprocessor output ● ● Compiler ● Object File ● ● Linker ● Executable
  • 7. Copyright@Embedkari Token ● Token is the smallest element of C program for Compiler – Keywords – Identifiers – Constants – Strings – Special Symbols – Operators ● Keywords are pre-defined or reserved words
  • 8. Copyright@Embedkari Keywords-32 ● Primitive Data Types and related Keywords (8) – int long double float short char unsigned signed ● Custom Data Types Related (3) – struct enum typedef ● Control statements (12) goto if else do while for – return switch case break continue default ● Storage specifiers(4) – auto register static extern ● Type Qualifiers(2) const volatile ● Misc(3) : void sizeof union ● Note: There are some additional reserve words added C99 onwards –
  • 9. Copyright@Embedkari Data Type size @ARM ABI C Type Machine Type Size char unsigned byte 1 unsigned char unsigned byte 1 signed char signed byte 1 [signed]short signed halfword 2 unsigned short unsigned halfword 2 [signed] int signed word 4 unsigned int unsigned word 4 [signed] long signed word 4 unsigned long unsigned word 4 [signed] long long signed double-word 8 unsigned long long unsigned double-word 8 float single precision (IEEE 754) 4 double double precision (IEEE 754) 8 Long double double precision (IEEE 754) 8
  • 10. Copyright@Embedkari Storage Specifiers ● auto (default) – Local variable with local life time ● extern or global variable – Variable defined outside function will have global scope ● static – Preserve this variable even after its scope ends ● register, – This variable has to be stored in CPU register. Variables used often can be defined in this category from performance perspective. But keep in mind the limited cpu registers ●
  • 11. Copyright@Embedkari Exercise : Data Types and Storage Classifiers ● Define variables based on different storage classifiers and data type ● Check size of data type defined ● Check default initial value and memory location of different storage classifiers ● #include <stdio.h> //Pre-processor //This is First C Program – int main() { – printf("Hello, World! n"); //printf() function – return 0; – } ●
  • 12. Copyright@Embedkari THANKS If you found this information usefule < Please like this video AND subscribe to www.youtube.com/c/embedkari Embedded Career Information : www.facebook.com/embedkari Blog:www.embedkari.com