Docsity

C Programming Handwritten Notes | Beginner to Advanced | Exam-Oriented, Study notes of C programming

Partial preview of the text

Download C Programming Handwritten Notes | Beginner to Advanced | Exam-Oriented and more Study notes C programming in PDF only on Docsity!

Misty of = . a: Dennis_ Ritchie COR)= s # “lo, $ BREA bol il Be Gea cd, | symbols ,erc, i | | ; _ e | ] , 43 2 i | Fig i ¢ character sot To represent characher value ine clang | we can use char datatypes. | | char ch’, E CV 2 Bee kes ch= §?: = eee See SS ee pos SM aria blas — nabs lisiaklog | is _an_idenhfrens mais change the »——value_duing the oxecution oF amgtams.s i. “Warlable is a name which is given toner “Variable is a nickname which 1s given to > memory locaton - “Nariabla are used to store ¢ nteger, fl floating Lb Point % character types of value. ites? Varigbles Le ® Voriable name start b phabels or Underscore (-) ib should. arena stort _usbtth —— Numbers_or _special symbols - 8 Keywords tonne be used as. Variable, name ee By T+ does net Allowed any speda!) symbal between Yariahige name... except undersea a o [Ne aoithes spaces, allow ed Lanai aan vaniabb. ale ‘= SRaximum length oF, vartable _ aes eye ele . | character’ _ 3 aa eg - aoe __—|}—_—erode Ll vatd_ oh sturdename. MH Valid — oe cere OTS il Valid - (2 Bing Ht Lnvalid - Emp Galaxy il Invalid mn emp Eid Invalid a: Nazi able declayatan — ___||_ = the. vorighles ave Agelaeed woith its dota _ _l+ype_ _ Synto— : Ay | datatype _ variable Name 3 (eg. _ oats : | ink num { Float marks 55 | | a an ey _chaw gtade »lyter le an _initalize vaciable by ‘assigning _ _|_some values. | 20g. > _ | Numa loos | iE z marks cog. 99,3 t- _ 9 rade = f' z eh —_—_—— | : zge He,| . r a Bete | | eee eee pa in u er === <= —Ginkgar = | ——Athis inkgec dake pe. ere lokeger typ¢ value. .without Lpaint. Co-=9 digit =Temary Recduiced _ Bbybes _ =! Bormat Spedfier= 7,0 ~ = Range = -32762 dn 439767 wh LQ. ; _ : © Float = oe is predefined datatype . ed. to declare variable which store _ decimal pointvalue : ae Ie xe quired 4 by te memary « _ + —Floa tp * _4 b = Ihe a ence =+—Form met Spauliae= 7.8 « Double - Same as float. stores decimal Range. "Fe -308 to te +308 “a | Memon) - 8 bytes - “format Speufier= a} call Cha racter - “| char js predefined dato type > = | Used +o shore charables dpe of value. = Momary = | byle —_ | =| Format Spevitter= Te C {| | 2g» char chs ! ch = fe 13 i “| Must wel Hon in signgle quot h'en ’ a — — ere: | j Bs: il i j — ee | sass E so ‘ a pesca reese a pithy = | - Tdenhfier is aq name given to variable constant if — union , pointer Punchons ete . Ee ii = ; = “aN ic We yse identfier name: far ident @ #.*, 2% L = Symbol ‘le _,et a Momory’ = 2 bytes + Memasy teal = 4 kytes | _— _ i Roy pinerd eee required” “doubk| = 9 bytes | Choractey value should | core rere —- | bo represented by z x‘ int x 2 We can repeal Fic atting point value 1 usi ngs Ingle quacks on | — t K=EIVS rn in dues euiGand valu b 4 Erachanal form=| 12-3 jias-2,12-S | Range :-12 @ to $127 a HNarlable Mame: © Cxponental far|= Use e choracter | - =H Vorioble Name » | | Memory: 1 byte 5-40-88] =>] 5. unio? { : alae a et | | +Farmat Specifier + fo ¢ | rantssé a Exponent, _ Exe zs __ a - char m4 cies Ex Mo =O —_____— float pi ble q 5 i NS a P= 56-7Q 4 tt es ; ce ——$ —Data type Cony ORSION fai) j ri Cashna I Cash AG Done by System Done by proramer ot a -int a= 444 Ssitam) am has i float B 4 Float b b= a's ot pecFloatya ’y lo = 000000 - = 1000000 | [aka hype Converston CWy5eo Cast ng J : To convert ane ae type 40 another data hype Lis. known as data tyne conversion or pe cast ng Ton ee costing —> io) Timplicit ty pe _cdstng —O Explicit 4y pe casting - he ahi = —____! "Write o pmgram +o demonstrate implicit ~ type casting/ Hpe conversion = ——_ Ta convert ane data type -#to-another dats ‘pe js known as type casing . Type casHng which is done by system Known ds implicit type .*/ - - __# include Ded. _ink main) 9 S00 00s teg Fe int a=l00, gee Float. b = 1204 5 a | b=as . : | _ pring fF Cy sue of a=%d” ayy : _ print FC In Volue of b= ab by); _ rehien 3 74 lI % 2 a = Output fe ni — _ ‘Value of G-106 | ee Value of b-100-000000 _ | —_—________ —— A ‘Woischninds Vie ; < - Constant is variable which 400s naj change value duing —@xecution of prog rom -Cnstont is a value tahich dees nf change during oxecuton of PITQ TOM, | 2 | Ty pes oF 23 = C censtans a | “ie \ a —— Ye | Psicnary) _ Secondarx = Constants Constants Integer consiont ferray a3 (Soak). Real rasa Pa \nte By, | Chara cher —1— Str chuse i : Unian a bs : _ Enum , ekc | 7 *® Classiftcah on of Constq ako z -_ e Pei mary Cansta nrg —> _ i L ~piftalage Ga 0S eae ae fo An cinkeges deonebaicd ia, — —t ‘Ainintager s Called as Floating point constant - (an_be written “in two Forms = Fractional en Exponent | Farm