SlideShare ist ein Scribd-Unternehmen logo
1 von 27
C Programming Course Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Why teach C? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Some programmer jargon ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
More about Hello World Preprocessor Library command main() means “start here” Comments are good Return 0 from main means our program finished without errors Brackets define code blocks
C doesn’t care much about spaces Both of these programs are exactly the same as the original as far as your compiler is concerned. Note that words have to be kept together and so do things in quotes. In the next lecture we'll learn how we SHOULD lay out our C program to make them look nice
 
Keywords of C ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Types of variable ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Naming variables ,[object Object],[object Object],[object Object],[object Object],int a,b; double d; /* This is a bit cryptic */ int start_time; int no_students; double course_mark; /* This is a bit better */
The  char  type ,[object Object],[object Object],[object Object],[object Object],int main() { char a, b; a= 'x';  /* Set a to the character x */ printf ("a is %c",a); b= ''; /* This really is one character*/ printf ("b is %c",b); return 0; }
More types: Signed/unsigned, long, short, const ,[object Object],[object Object],[object Object],short int small_no;  unsigned char uchar; long double precise_number; short float not_so_precise; const short float pi= 3.14; const long double e= 2.718281828;
A short note about  ++ ,[object Object],[object Object],int i= 6; printf ("%d",i++);  /* Prints 6 sets i to 7 */ int i= 6; printf ("%d",++i);  /* prints 7 and sets i to 7 */ Note this important difference It is easy to confuse yourself and others with the difference  between  ++i  and  i++  - it is best to use them only in simple ways. All of the above also applies to  -- .
Some simple operations for variables ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Casting between variables ,[object Object],[object Object],int a= 3; int b= 4; double c; c= (double)a/(double)b; By using  ( type )  in front of a variable we tell the variable to act like another type of variable.  We can cast between any type.  Usually, however, the only reason to cast is to stop ints being rounded by division. Cast ints a and b to be doubles
What is a function? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
An example function Prototype the function Call the function The function itself function header
Functions can access other functions ,[object Object]
void  functions ,[object Object],Prototype (at top of file remember) void odd_or_even (int); Function takes and returns void (no arguments) Function which takes one int arguments and returns none Another prototype
Notes about functions ,[object Object],[object Object],[object Object],[object Object]
Where do functions go in the program ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What are these prototype things? ,[object Object],[object Object],[object Object],[object Object]
What is scope? ,[object Object],[object Object],[object Object],[object Object],[object Object]
The print stars example This program prints five rows of five stars This prints 'n' stars and then a new line character Loop around 5 times to  print the stars ***** ***** ***** ***** ***** Variables here are LOCAL variables
Why global is bad This program only prints ONE row of five stars Variable here is global variable
Thinking like the computer for debugging  ,[object Object],[object Object],[object Object],[object Object]
Factorial program (and thoughts) int main() { int number= 4; int answer; int count; answer= 1; count= number; while (count >= 0) { answer= answer* count; count--; } printf ("%d! = %d", number,answer); return 0; } number= 4 answer= 1 count= 4 enter while loop answer= 1*4=4 count=3 enter while loop answer=4*3= 12 count=2 enter while loop answer=12*2= 24 count= 1 enter while loop answer= 24*1= 24 count= 0 enter while loop answer= 24*0= 0 AHA – I see!!!
Other techniques for debugging ,[object Object],[object Object],[object Object],[object Object],[object Object]

Weitere ähnliche Inhalte

Was ist angesagt? (20)

What is c
What is cWhat is c
What is c
 
Lecture 9- Control Structures 1
Lecture 9- Control Structures 1Lecture 9- Control Structures 1
Lecture 9- Control Structures 1
 
Lecture 11 - Functions
Lecture 11 - FunctionsLecture 11 - Functions
Lecture 11 - Functions
 
7 functions
7  functions7  functions
7 functions
 
Lecture 10 - Control Structures 2
Lecture 10 - Control Structures 2Lecture 10 - Control Structures 2
Lecture 10 - Control Structures 2
 
C Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.comC Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.com
 
Void pointer in c
Void pointer in cVoid pointer in c
Void pointer in c
 
4 operators, expressions & statements
4  operators, expressions & statements4  operators, expressions & statements
4 operators, expressions & statements
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
Input And Output
 Input And Output Input And Output
Input And Output
 
Assignment12
Assignment12Assignment12
Assignment12
 
Operators and Control Statements in Python
Operators and Control Statements in PythonOperators and Control Statements in Python
Operators and Control Statements in Python
 
Concepts of C [Module 2]
Concepts of C [Module 2]Concepts of C [Module 2]
Concepts of C [Module 2]
 
Python-02| Input, Output & Import
Python-02| Input, Output & ImportPython-02| Input, Output & Import
Python-02| Input, Output & Import
 
Python Unit 3 - Control Flow and Functions
Python Unit 3 - Control Flow and FunctionsPython Unit 3 - Control Flow and Functions
Python Unit 3 - Control Flow and Functions
 
Unit ii ppt
Unit ii pptUnit ii ppt
Unit ii ppt
 
UNIT-II CP DOC.docx
UNIT-II CP DOC.docxUNIT-II CP DOC.docx
UNIT-II CP DOC.docx
 
Mesics lecture 5 input – output in ‘c’
Mesics lecture 5   input – output in ‘c’Mesics lecture 5   input – output in ‘c’
Mesics lecture 5 input – output in ‘c’
 
C language basics
C language basicsC language basics
C language basics
 
CPU INPUT OUTPUT
CPU INPUT OUTPUT CPU INPUT OUTPUT
CPU INPUT OUTPUT
 

Andere mochten auch

what professional job is like
what professional job is likewhat professional job is like
what professional job is likejefferyshiau
 
REAP WHAT YOU SOW
REAP WHAT YOU SOWREAP WHAT YOU SOW
REAP WHAT YOU SOWdebzters
 
omgaan met auteursrecht in het moderne onderwijs train-de-trainer iScholengroep
omgaan met auteursrecht in het moderne onderwijs train-de-trainer iScholengroepomgaan met auteursrecht in het moderne onderwijs train-de-trainer iScholengroep
omgaan met auteursrecht in het moderne onderwijs train-de-trainer iScholengroepKennisland
 
Co quan cam giac p1 (anh)
Co quan cam giac p1 (anh)Co quan cam giac p1 (anh)
Co quan cam giac p1 (anh)Pham Ngoc Quang
 
Chuong 6 stress thich nghi
Chuong 6 stress   thich nghiChuong 6 stress   thich nghi
Chuong 6 stress thich nghiPham Ngoc Quang
 
Safari 2011 team abc onderwijsadviseurs
Safari 2011   team abc onderwijsadviseursSafari 2011   team abc onderwijsadviseurs
Safari 2011 team abc onderwijsadviseursKennisland
 
Baraka blues aesthetic
Baraka blues aestheticBaraka blues aesthetic
Baraka blues aestheticTeresa Levy
 
AP US Museum Presentation 1960s
AP US Museum Presentation 1960sAP US Museum Presentation 1960s
AP US Museum Presentation 1960scrazy4football3
 
TANET - Luat thue TNDN - 07.2010
TANET - Luat thue TNDN -  07.2010TANET - Luat thue TNDN -  07.2010
TANET - Luat thue TNDN - 07.2010Pham Ngoc Quang
 
Bet youdon'tknowreading
Bet youdon'tknowreadingBet youdon'tknowreading
Bet youdon'tknowreadingMonica Campana
 
Ocd masterclass 2014_terugkomdag_impactmeting
Ocd masterclass 2014_terugkomdag_impactmetingOcd masterclass 2014_terugkomdag_impactmeting
Ocd masterclass 2014_terugkomdag_impactmetingKennisland
 
Anarcho multiculturalism and_education (1)
Anarcho multiculturalism and_education (1)Anarcho multiculturalism and_education (1)
Anarcho multiculturalism and_education (1)Teresa Levy
 
Summit keynote Anna Maybank
Summit keynote Anna MaybankSummit keynote Anna Maybank
Summit keynote Anna MaybankKennisland
 
Tackling the Talent Challenge
Tackling the Talent ChallengeTackling the Talent Challenge
Tackling the Talent ChallengeDavid Fletcher
 
Business continuity for Information Systems
Business continuity for Information SystemsBusiness continuity for Information Systems
Business continuity for Information SystemsDavid Fletcher
 

Andere mochten auch (20)

what professional job is like
what professional job is likewhat professional job is like
what professional job is like
 
REAP WHAT YOU SOW
REAP WHAT YOU SOWREAP WHAT YOU SOW
REAP WHAT YOU SOW
 
omgaan met auteursrecht in het moderne onderwijs train-de-trainer iScholengroep
omgaan met auteursrecht in het moderne onderwijs train-de-trainer iScholengroepomgaan met auteursrecht in het moderne onderwijs train-de-trainer iScholengroep
omgaan met auteursrecht in het moderne onderwijs train-de-trainer iScholengroep
 
Pavlov
PavlovPavlov
Pavlov
 
Nhap mon sinh hoc 1
Nhap mon sinh hoc 1Nhap mon sinh hoc 1
Nhap mon sinh hoc 1
 
Co quan cam giac p1 (anh)
Co quan cam giac p1 (anh)Co quan cam giac p1 (anh)
Co quan cam giac p1 (anh)
 
Chuong 6 stress thich nghi
Chuong 6 stress   thich nghiChuong 6 stress   thich nghi
Chuong 6 stress thich nghi
 
Safari 2011 team abc onderwijsadviseurs
Safari 2011   team abc onderwijsadviseursSafari 2011   team abc onderwijsadviseurs
Safari 2011 team abc onderwijsadviseurs
 
Baraka blues aesthetic
Baraka blues aestheticBaraka blues aesthetic
Baraka blues aesthetic
 
AP US Museum Presentation 1960s
AP US Museum Presentation 1960sAP US Museum Presentation 1960s
AP US Museum Presentation 1960s
 
TANET - Luat thue TNDN - 07.2010
TANET - Luat thue TNDN -  07.2010TANET - Luat thue TNDN -  07.2010
TANET - Luat thue TNDN - 07.2010
 
Bet youdon'tknowreading
Bet youdon'tknowreadingBet youdon'tknowreading
Bet youdon'tknowreading
 
Ocd masterclass 2014_terugkomdag_impactmeting
Ocd masterclass 2014_terugkomdag_impactmetingOcd masterclass 2014_terugkomdag_impactmeting
Ocd masterclass 2014_terugkomdag_impactmeting
 
Case Sara Zoekt Werk
Case Sara Zoekt WerkCase Sara Zoekt Werk
Case Sara Zoekt Werk
 
Specimenprep
SpecimenprepSpecimenprep
Specimenprep
 
Anarcho multiculturalism and_education (1)
Anarcho multiculturalism and_education (1)Anarcho multiculturalism and_education (1)
Anarcho multiculturalism and_education (1)
 
Summit keynote Anna Maybank
Summit keynote Anna MaybankSummit keynote Anna Maybank
Summit keynote Anna Maybank
 
Tackling the Talent Challenge
Tackling the Talent ChallengeTackling the Talent Challenge
Tackling the Talent Challenge
 
jaredppt
jaredpptjaredppt
jaredppt
 
Business continuity for Information Systems
Business continuity for Information SystemsBusiness continuity for Information Systems
Business continuity for Information Systems
 

Ähnlich wie Lập trình C

Presentation 2 (1).pdf
Presentation 2 (1).pdfPresentation 2 (1).pdf
Presentation 2 (1).pdfziyadaslanbey
 
C programing Tutorial
C programing TutorialC programing Tutorial
C programing TutorialMahira Banu
 
Tutorial basic of c ++lesson 1 eng ver
Tutorial basic of c ++lesson 1 eng verTutorial basic of c ++lesson 1 eng ver
Tutorial basic of c ++lesson 1 eng verQrembiezs Intruder
 
INDIAN INSTITUTE OF TECHNOLOGY OF KANPURESC 111M Lec03.pptx
INDIAN INSTITUTE OF TECHNOLOGY OF KANPURESC 111M Lec03.pptxINDIAN INSTITUTE OF TECHNOLOGY OF KANPURESC 111M Lec03.pptx
INDIAN INSTITUTE OF TECHNOLOGY OF KANPURESC 111M Lec03.pptxAbhimanyuChaure
 
Claguage 110226222227-phpapp02
Claguage 110226222227-phpapp02Claguage 110226222227-phpapp02
Claguage 110226222227-phpapp02CIMAP
 
The Sieve of Eratosthenes - Part 1
The Sieve of Eratosthenes - Part 1The Sieve of Eratosthenes - Part 1
The Sieve of Eratosthenes - Part 1Philip Schwarz
 
The Sieve of Eratosthenes - Part 1 - with minor corrections
The Sieve of Eratosthenes - Part 1 - with minor correctionsThe Sieve of Eratosthenes - Part 1 - with minor corrections
The Sieve of Eratosthenes - Part 1 - with minor correctionsPhilip Schwarz
 
Presentation 5th
Presentation 5thPresentation 5th
Presentation 5thConnex
 
Python breakdown-workbook
Python breakdown-workbookPython breakdown-workbook
Python breakdown-workbookHARUN PEHLIVAN
 
88 c programs 15184
88 c programs 1518488 c programs 15184
88 c programs 15184Sumit Saini
 
C++ programming language basic to advance level
C++ programming language basic to advance levelC++ programming language basic to advance level
C++ programming language basic to advance levelsajjad ali khan
 
C programming_MSBTE_Diploma_Pranoti Doke
C programming_MSBTE_Diploma_Pranoti DokeC programming_MSBTE_Diploma_Pranoti Doke
C programming_MSBTE_Diploma_Pranoti DokePranoti Doke
 
the refernce of programming C notes ppt.pptx
the refernce of programming C notes ppt.pptxthe refernce of programming C notes ppt.pptx
the refernce of programming C notes ppt.pptxAnkitaVerma776806
 

Ähnlich wie Lập trình C (20)

C Programming Unit-1
C Programming Unit-1C Programming Unit-1
C Programming Unit-1
 
C++ lecture 01
C++   lecture 01C++   lecture 01
C++ lecture 01
 
Presentation 2 (1).pdf
Presentation 2 (1).pdfPresentation 2 (1).pdf
Presentation 2 (1).pdf
 
C programing Tutorial
C programing TutorialC programing Tutorial
C programing Tutorial
 
Tutorial basic of c ++lesson 1 eng ver
Tutorial basic of c ++lesson 1 eng verTutorial basic of c ++lesson 1 eng ver
Tutorial basic of c ++lesson 1 eng ver
 
INDIAN INSTITUTE OF TECHNOLOGY OF KANPURESC 111M Lec03.pptx
INDIAN INSTITUTE OF TECHNOLOGY OF KANPURESC 111M Lec03.pptxINDIAN INSTITUTE OF TECHNOLOGY OF KANPURESC 111M Lec03.pptx
INDIAN INSTITUTE OF TECHNOLOGY OF KANPURESC 111M Lec03.pptx
 
#Code2 create c++ for beginners
#Code2 create  c++ for beginners #Code2 create  c++ for beginners
#Code2 create c++ for beginners
 
Claguage 110226222227-phpapp02
Claguage 110226222227-phpapp02Claguage 110226222227-phpapp02
Claguage 110226222227-phpapp02
 
Learn C
Learn CLearn C
Learn C
 
The Sieve of Eratosthenes - Part 1
The Sieve of Eratosthenes - Part 1The Sieve of Eratosthenes - Part 1
The Sieve of Eratosthenes - Part 1
 
The Sieve of Eratosthenes - Part 1 - with minor corrections
The Sieve of Eratosthenes - Part 1 - with minor correctionsThe Sieve of Eratosthenes - Part 1 - with minor corrections
The Sieve of Eratosthenes - Part 1 - with minor corrections
 
Presentation 5th
Presentation 5thPresentation 5th
Presentation 5th
 
Python breakdown-workbook
Python breakdown-workbookPython breakdown-workbook
Python breakdown-workbook
 
88 c programs 15184
88 c programs 1518488 c programs 15184
88 c programs 15184
 
88 c-programs
88 c-programs88 c-programs
88 c-programs
 
C++ programming language basic to advance level
C++ programming language basic to advance levelC++ programming language basic to advance level
C++ programming language basic to advance level
 
C programming
C programmingC programming
C programming
 
C programming_MSBTE_Diploma_Pranoti Doke
C programming_MSBTE_Diploma_Pranoti DokeC programming_MSBTE_Diploma_Pranoti Doke
C programming_MSBTE_Diploma_Pranoti Doke
 
88 c-programs
88 c-programs88 c-programs
88 c-programs
 
the refernce of programming C notes ppt.pptx
the refernce of programming C notes ppt.pptxthe refernce of programming C notes ppt.pptx
the refernce of programming C notes ppt.pptx
 

Mehr von Viet NguyenHoang (20)

Thai nguyen 02-midrex
Thai nguyen 02-midrexThai nguyen 02-midrex
Thai nguyen 02-midrex
 
Thai nguyen 04-corex
Thai nguyen 04-corexThai nguyen 04-corex
Thai nguyen 04-corex
 
Thai nguyen 03-1-slrn
Thai nguyen 03-1-slrnThai nguyen 03-1-slrn
Thai nguyen 03-1-slrn
 
Thai nguyen 01-intro-print
Thai nguyen 01-intro-printThai nguyen 01-intro-print
Thai nguyen 01-intro-print
 
Lost foam cast process
Lost foam cast processLost foam cast process
Lost foam cast process
 
Grain size analysis by using ImageJ
Grain size analysis by using ImageJGrain size analysis by using ImageJ
Grain size analysis by using ImageJ
 
Tem Samp1
Tem Samp1Tem Samp1
Tem Samp1
 
Tem2
Tem2Tem2
Tem2
 
Tem1
Tem1Tem1
Tem1
 
Sin2005
Sin2005Sin2005
Sin2005
 
Nano Indentation Lecture1
Nano Indentation Lecture1Nano Indentation Lecture1
Nano Indentation Lecture1
 
Nano Indentation Lecture2
Nano Indentation Lecture2Nano Indentation Lecture2
Nano Indentation Lecture2
 
Thép
ThépThép
Thép
 
Govnet.Ppt
Govnet.PptGovnet.Ppt
Govnet.Ppt
 
Licensing,Ppt
Licensing,PptLicensing,Ppt
Licensing,Ppt
 
Open Source Presentation To Portal Partners2
Open Source Presentation To Portal Partners2Open Source Presentation To Portal Partners2
Open Source Presentation To Portal Partners2
 
Opensource Powerpoint Review.Ppt
Opensource Powerpoint Review.PptOpensource Powerpoint Review.Ppt
Opensource Powerpoint Review.Ppt
 
Manufacturing
ManufacturingManufacturing
Manufacturing
 
Nuclear Power
Nuclear PowerNuclear Power
Nuclear Power
 
Thermal Energy
Thermal EnergyThermal Energy
Thermal Energy
 

Kürzlich hochgeladen

CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Kürzlich hochgeladen (20)

CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Lập trình C

  • 1.
  • 2.
  • 3.
  • 4. More about Hello World Preprocessor Library command main() means “start here” Comments are good Return 0 from main means our program finished without errors Brackets define code blocks
  • 5. C doesn’t care much about spaces Both of these programs are exactly the same as the original as far as your compiler is concerned. Note that words have to be kept together and so do things in quotes. In the next lecture we'll learn how we SHOULD lay out our C program to make them look nice
  • 6.  
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16. An example function Prototype the function Call the function The function itself function header
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23. The print stars example This program prints five rows of five stars This prints 'n' stars and then a new line character Loop around 5 times to print the stars ***** ***** ***** ***** ***** Variables here are LOCAL variables
  • 24. Why global is bad This program only prints ONE row of five stars Variable here is global variable
  • 25.
  • 26. Factorial program (and thoughts) int main() { int number= 4; int answer; int count; answer= 1; count= number; while (count >= 0) { answer= answer* count; count--; } printf ("%d! = %d", number,answer); return 0; } number= 4 answer= 1 count= 4 enter while loop answer= 1*4=4 count=3 enter while loop answer=4*3= 12 count=2 enter while loop answer=12*2= 24 count= 1 enter while loop answer= 24*1= 24 count= 0 enter while loop answer= 24*0= 0 AHA – I see!!!
  • 27.