×
My under eye areas maybe dark but my future will be bright and that is more important.
--Your friends at LectureNotes
Close

Programming in C

by Abhishek Sharma
Type: NoteViews: 23Uploaded: 6 months agoAdd to Favourite

Share it with your friends

Suggested Materials

Leave your Comments

Contributors

Hi TechI nst i t ut eofEngi neer i ng&Technol ogy I nt r oduct i ont oCLanguage By -TanuSi nha
I NDEX CHAPTER1 I NTRODUCTI ON 1. 1ORI GI NOFC 1. 2THE“ HELLOWORLD”PROGRAM 1. 3THECPROGRAMMI NGENVI RONMENT CHAPTER2 VARI ABLES, DATATYPES, I / OANDOPERATORS 2. 1BASI CDATATYPES 2. 2VARI ABLES 2. 3CONSOLEI NPUT/OUTPUT 2. 4OPERATORS 2. 5TYPEOVERFLOW &UNDERFLOW 2. 6EXERCI SES CHAPTER3 STATEMENTS 3. 1EXPRESSI ONSANDSTATEMENTS 3. 2I TERATI ONSTATEMENTS 3. 3DECI SI ONSTATEMENTS 3. 4EFFI CI ENCYCONSI DERATI ONS 3. 5EXERCI SES CHAPTER4 FUNCTI ONS 4. 1FUNCTI ONPROTOTYPE(DECLARATI ON) 4. 2FUNCTI ONDEFI NI TI ON &L OCALVARI ABLES 4. 3SCOPERULES 4. 4RETURNI NGAVALUE 4. 5FUNCTI ONARGUMENTS 4. 6RECURSI ON 4. 7#DEFI NEDI RECTI VE 4. 8EFFI CI ENCYCONSI DERATI ONS 4. 9EXERCI SES CHAPTER5 ARRAYS&STRI NGS 5. 1SI NGLEDI MENSI ONARRAYS 5. 2STRI NGS 5. 3MULTI DI MENSI ONALARRAYS 5. 4ARRAYSOFSTRI NGS 5. 5ARRAYSASARGUMENTSTOFUNCTI ONS(1 D) 5. 6PASSI NGMULTI DI MENSI ONALARRAYS 5. 7EXERCI SES 2
CHAPTER6 POI NTERS 6. 1POI NTERVARI ABLES 6. 2POI NTER OPERATORS *AND& 6. 3CALLBYREFERENCE 6. 4POI NTERSANDARRAYS 6. 5POI NTERARI THMETI C 6. 6ARRAYSOFPOI NTERS 6. 7COMMANDLI NEARGUMENTS 6. 8DYNAMI CMEMORYALLOCATI ON 6. 9MULTI PLEI NDI RECTI ON-POI NTERSTOPOI NTERS 6. 10POI NTERSTOF UNCTI ONS 6. 11EFFI CI ENCYCONSI DERATI ONS 6. 12EXERCI SES CHAPTER7 STRUCTURES&UNI ONS 7. 1STRUCTURES 7. 2BI TFI ELDS 7. 3UNI ONS 7. 4ENUMERATI ONS 7. 5THETYPEDEFKEYWORD 7. 6LI NKEDL I STS 7. 7EFFI CI ENCYCONSI DERATI ONS 7. 8EXERCI SES CHAPTER8 STANDARDFI LEI / O 8. 1STREAM I / O 8. 2LOW -LEVELI / O 8. 3EXERCI SES 105 3
Chapt er1 I nt r oduct i on 1. 1Or i gi nofC TheC Pr ogr ammi ngLanguagewasi ni t i al l ydev el opedbyDeni sRi t chi eusi ngaUni x sy st em i n1972.Thi swasv ar i edandmodi f i edunt i last andar dwasdef i nedbyBr i an Ker ni ghanandDenni sRi t chi ei n1978i n" TheCPr ogr ammi ngLanguage" . Byt heear l y80' smanyv er si onsofCwer eav ai l abl ewhi chwer ei nconsi st entwi t heach ot heri nmanyaspect s.Thi sl edt oast andar dbei ngdef i nedbyANSIi n1983.I ti st hi s st andar dt hi ssetofnot espr i mar i l yaddr esses. WhyuseC? I ndust r yPr esence:Ov ert hel astdecadeChasbecomeoneoft hemostwi del yused dev el opmentl anguagesi nt hesof t war ei ndust r y .I t si mpor t ancei snotent i r el yder i v ed f r om i t suseasapr i mar ydev el opmentl anguagebutal sobecauseofi t suseasan i nt er f acel anguaget osomeoft henewer“ v i sual ”l anguagesandofcour sebecauseof i t sr el at i onshi pwi t hC++. Mi ddl e Lev el:Bei ng a Mi ddl el ev ell anguage i tcombi nes el ement s ofhi gh l ev el l anguageswi t ht hef unct i onal i t yofassembl yl anguage.C suppor t sdat at y pesand oper at i onsondat at y pesi nmucht hesamewayashi gherl ev ell anguagesaswel las al l owi ngdi r ectmani pul at i onofbi t s, by t es, wor dsandaddr essesasi spossi bl ewi t hl ow l ev el l anguages. Por t abi l i t y:Wi t ht heav ai l abi l i t yofcompi l er sf oral mostal loper at i ngsy st emsand har dwar epl at f or msi ti seasyt owr i t ecodeononesy st em whi chcanbeeasi l ypor t edt o anot herasl ongasaf ewsi mpl egui del i nesar ef ol l owed. Fl exi bi l i t y:Suppor t i ngi t sposi t i onast hemai nst r eam dev el opmentl anguageCcanbe i nt er f acedr eadi l yt oot herpr ogr ammi ngl anguages. Mal l eabl e:C,unl i kesomeot herl anguages,of f er sl i t t l er est r i ct i ont ot hepr ogr ammer wi t hr egar dt odat at y pes-onet y pemaybecoer cedt oanot hert y peast hesi t uat i on di ct at es.Howev ert hi sf eat ur ecanl eadt osl oppycodi ngunl esst hepr ogr ammeri sf ul l y awar eofwhatr ul esar ebei ngbentandwhy . Speed:Theav ai l abi l i t yofv ar i ousopt i mi si ngcompi l er sal l owext r emel yef f i ci entcodet o begener at edaut omat i cal l y . 4

Lecture Notes