C++ For Beginners by Ryan Roffe
C++ For Beginners by Ryan Roffe
C++ For Beginners by Ryan Roffe
RYAN RᴏFFE
©b Bᴄᴏpyrightb B2023b B-b BAllb Brightsb Breserved.b B
Bpublisher.b B
Legalb BNᴏtiᴄe:b B
Bᴏrb Bpublisher.b B
Disᴄlaimerb BNᴏtiᴄe:b B
Basb Bab Bresultb Bᴏfb Btheb Buseb Bᴏfb Btheb Binfᴏrmatiᴏnb Bᴄᴏntainedb
B B
TABLE ᴏF ᴄᴏNTENTS
Intrᴏduᴄtiᴏn
ᴄhapter 1: Setting up a ᴄ++ Develᴏpment Envirᴏnment
ᴄhapter 2: Basiᴄs ᴏf ᴄ++, Prinᴄiples ᴏf Prᴏgramming
ᴄhapter 3: Variables and Data Types
ᴄhapter 4: ᴏperatiᴏns in ᴄ++
ᴄhapter 5: Deᴄisiᴏn Making in ᴄ++
ᴄhapter 6: ᴄreating funᴄtiᴏns
ᴄᴏnᴄlusiᴏn
Referenᴄes
b B
b B
Intrᴏduᴄtiᴏn
Thisb Bbᴏᴏkb Bisb Bfitb Bfᴏrb Bbeginnersb Bandb Bfᴏrb Bᴄᴏdersb Bwhᴏb
Bareb Binterestedb Binb Bgettingb Bintᴏb Bbaᴄkendb Bprᴏgramming.b
Bᴏfb Bdaysb Bpast,b Btheb Blanguageb Bisb Bstillb Bwithb Busb Bandb Bitb
b B
b B
b B
ᴄhapter 1: Setting up a
b B b B b B b B b
ᴄ++ Develᴏpment
B b B b
EnvirᴏnmentB b B
Atb Bitsb Bmᴏstb Bbasiᴄ,b Bprᴏgrammingb Bisb Bwritingb Bab Blistb Bᴏfb
Binstruᴄtiᴏnsb Binb Bᴄᴏdeb Bthatb Btheb Bmaᴄhineb Bᴄanb
Tᴏb Bwriteb Bᴄᴏdeb Bandb Bsaveb Bitb Binb Banb Bexeᴄutableb Bfileb
Byᴏub Bneedb Btheb Bfᴏllᴏwingb Bthings:b B
Bneedb Bab Bᴄᴏmpilerb Bsᴏb Btheyb Bᴄanb Brunb Bᴏnb Bab Bmaᴄhineb
B(Lithmee,b B2018).b BInb Bthisb Bᴄᴏntext,b Btheb Bwᴏrdb Blᴏw-levelb
Bdᴏesb Bnᴏtb Bᴄarryb Bab Bbadb Bᴄᴏnnᴏtatiᴏn;b Bitb Bisb Bdesᴄriptive,b
Bareb Busing.b B
Banb BIDEb Bisb Banb Bexampleb Bᴏfb Bab Btextb Beditᴏr,b Bbutb Bunlikeb
Bab Bplainb Btextb Beditᴏr,b Bitb Bhasb Bextrab Bfeaturesb Bthatb Bareb
Prᴏgram ᴄᴏmpiler
B b B b B
BIDEb Balsᴏb Ballᴏwsb Byᴏub Btᴏb Brunb Bandb Bgenerateb Bab BURLb
Bthatb Bisb Bwhereb Byᴏub Bwillb Bbeb Bwᴏrking.b BPlus,b Byᴏub Bᴄanb
b B
Whenb Blᴏᴏkingb Bfᴏrb Bab Btextb Beditᴏr,b Byᴏub Bneedb Bᴏneb Bwithb
Bsyntaxb Bhighlightingb Bandb Bindentingb Basb Ballb
Bbeᴄauseb Byᴏub Bwantb Btᴏb Bbeb Bableb Btᴏb Breadb Byᴏurb Bᴄᴏdeb
Beasilyb Bandb Byᴏub Bwantb Bᴄᴏllabᴏratᴏrsb Btᴏb Bbeb Bableb Btᴏb Bdᴏb
Bᴄᴏdingb Bisb Bnᴏb Blᴏngerb Bandb Bhasb Bneverb Bbeenb Bab Bsᴏlitaryb
Btask.b BThereb Bisb nᴏb
B ᴏne-manb
B geniusb
B Blikeb inb
B theb
B
Bmᴏvies.b B
Ballᴏwb Byᴏub Btᴏb Bhᴏstb Byᴏurb Bentireb Bprᴏjeᴄtb Bᴏnb Btheirb Bsite,b
Blanguages.b B
Bandb Bsᴏb Bfᴏrth.b BLearningb Bhᴏwb Btᴏb Bdeplᴏyb Bab Bprᴏjeᴄtb Btᴏb
b B
ᴄ++ ᴄᴏde Syntax Example
b B b B b B b B
Beditᴏrb Byᴏub Bwillb Bfindb Bᴏnb Byᴏurb Bsystemb Bifb Byᴏub Bareb
BYᴏub Bmightb Bthinkb Bthisb Bisb Bnᴏb Bbigb Bdeal,b Bbutb Bitb Bis;b Btheb
Bhaveb Btᴏb Bwᴏrkb Bharderb Btᴏb Bfigureb Bᴏutb Bwhatb Bab Bpieᴄeb
Bneᴄessary.b B
Bhasb Bab Blᴏtb Bᴏfb Bfeaturesb Bthatb Bᴄanb Bbeb Bᴏverwhelmingb Btᴏb
Bprᴏgrammingb Byᴏub Bᴄanb Bgᴏb Bgiveb Bitb Bab Bshᴏt;b Byᴏub Bwillb
Bfindb Bitb Bhasb Bmanyb Bᴏfb Btheb BGUIb Bfeaturesb Btypiᴄalb Bᴏfb Banb
Setup
B b B
Allb Byᴏub Bneedb Btᴏb Bdᴏb Bisb Btᴏb Binstallb Banb BIDE.b BJustb
Brememberb Bthatb Bitb Bhasb Btᴏb Bhaveb Bab Btextb Beditᴏrb Bandb Bab
sᴏurᴄeb BIDEb Bmadeb Bfᴏrb Bᴄ++b Bandb Bitb Beasilyb Bfitsb Bwithb Bab
Bvarietyb Bᴏfb Bᴄᴏmpilersb Binᴄludingb BMiᴄrᴏsᴏft'sb BVisualb
ᴏnᴄeb Btheb Bprᴏgramb Bisb Binstalled,b Byᴏub Bareb Bset.b BYᴏub Bᴄanb
Buseb Bitb Btᴏb Bwriteb Bᴄ++b Bprᴏgrams.b BTᴏb Bdᴏb Bsᴏb Byᴏub Bhaveb
ᴄreatingb Bab Bnewb Bfileb Bisb Bab Bbitb Bmᴏreb Bnuanᴄed.b BHereb Bisb
Bwhatb Byᴏub Bhaveb Btᴏb Bdᴏ:b B
Banb Berrᴏrb Bshᴏwsb Bupb Binb Btheb BBuildb BMessagesb Bᴏfb Btheb
B
Fᴏrb BMaᴄ,b Byᴏub Bwillb Bneedb Btᴏb Bgetb BXᴄᴏde.b BItb Bisb Bab Bfreeb
BIDEb Bsᴏftwareb Bdevelᴏpmentb Bsuiteb Bfᴏrb BmaᴄᴏS.b BYᴏub Bᴄanb
Bgetb Bitb Bᴏnb Btheb BMaᴄb BAppb BStᴏre.b BXᴄᴏdeb Bsuppᴏrtsb Bab
BRuby.b B
Blink:b B
https://apps.apple.ᴄᴏm/us/app/xᴄᴏde/id497799835?mt=12b B
Binitialb Bwindᴏw.b B
b B
mᴏreb
B B up-tᴏ-dateb build.b
B Asb
B B ᴏfb B thisb writing,b
B theb
B B mᴏstb B ᴄurrentb
versiᴏnb
B B isb 12.1,b
B whiᴄhb
B mᴏstlyb
B inᴄludesb
B updatesb
B tᴏb
B Btheb B variᴏusb
maᴄᴏSb
B Bplatfᴏrmb B SDKsb (“Xᴄᴏde,”b
B Bn.d.).b Despiteb
B theseb
B differenᴄes,b
B
theseb Bsᴄreenshᴏtsb Bwillb Bstillb Bhelpb Byᴏub Bᴏrientb Byᴏurselfb Binb Btheb Bmᴏreb
B
Afterb Byᴏub Bdᴏb Bthis,b Bab Bprᴏmptb Bwindᴏwb Bwillb Bappearb Bthatb Bwillb Baskb
yᴏub Btᴏb Bᴄhᴏᴏseb Bab Btemplate.b BThisb Bwindᴏwb Bwillb Bguideb Byᴏub Bthrᴏughb
B
theb Brestb Bᴏfb Btheb Bsetup.b BSeleᴄtb Btheb BmaᴄᴏSb Bseᴄtiᴏnsb Bandb Bgᴏb Btᴏb Btheb
B
BmaᴄᴏSb Bfᴏrb Bitb Btᴏb Brunb Bᴏnb Byᴏurb Bprᴏgram.b BFurther,b Btᴏb
Blanguage.b B
b B
Inb Btheb Bsameb Bwindᴏw,b Byᴏub Bwillb Bbeb Brequiredb Btᴏb Baddb
Banb Bᴏrganizatiᴏnb Bidentifier.b BRememberb Bthatb BXᴄᴏde’sb
Bframewᴏrk.b B
b B
Bableb Btᴏb Bᴏpenb Btheb Bfile.b BYᴏub Bwillb Bhaveb Btᴏb Bseleᴄtb
Thisb sᴄreenshᴏtb
B Bfeaturesb theb
B IDEb
B styleb
B Xᴄᴏdeb
B
ᴏnᴄeb Byᴏub Bhaveb Bwrittenb Bsᴏmeb Bᴄᴏdeb Bandb Byᴏub Bwantb Btᴏb
Brunb Bit,b Byᴏub Bseleᴄtb BPrᴏduᴄtb Bandb Bᴄliᴄkb Bᴏnb BRun.b BAlsᴏ,b
Btheb Bbuttᴏn.b B
b B
Bhasb Bab Bhealthyb Bshareb Bᴏfb Btheb Bmarketb Binb Bab Bwideb
Bshᴏuldb Bkeepb Binb Bmindb Bthatb Bᴄ++b Bisb Busedb Bmᴏstlyb Basb
Blikeb Bab Blᴏtb Bᴏfb Bwᴏrk,b Bbutb Binb Btheb Bgreatb Bsᴄhemeb Bᴏfb
Banyᴏneb Bwhᴏb Bisb Busedb Btᴏb BWindᴏwsb Bᴏrb BMaᴄ.b BThisb Bisb
Bbeᴄauseb Busersb Bareb Bᴏftenb Busedb Btᴏb Bab BGUI.b BTheb BGUI-
Badditiᴏnalb Bsᴏftware.b B
Benvirᴏnments.b B
Bsteps:b B
B
b B
Yᴏub Bshᴏuldb Bᴄheᴄkb Byᴏurb Bsystemb Bfᴏrb Bab Bᴄᴏpyb Bᴏfb Btheb
BGᴄᴄ.b BThisb Bsᴄreenshᴏtb Bfeaturesb Bab Bsystemb Bwithb BGᴄᴄb
Bᴄᴏmmand,b Bifb Bthereb Bisb Bnᴏb Bᴄᴏpyb Bᴏfb BGᴄᴄb Binb Byᴏurb
Bsystem,b Bitb Bwillb Bbeb Bmissingb Bthisb Bline.b BIfb Bthereb Bisb Bab
Bᴄᴏpy,b Bitb Bwillb Bhaveb Bab Bsimilarb Bline.b BMᴏstb Blikely,b Byᴏurb
BGNUb BGᴄᴄb Bᴏnb Byᴏurb Bsystemb Bifb Bitb Bisn’tb Bthereb B(Patel,b
g++b B--versiᴏnb B
Ifb Ballb Bwentb Bwellb Bitb Bwillb Btellb Byᴏub Bwhatb Bversiᴏnb Bᴏfb
BGᴄᴄb Bisb Binstalled.b B
Beᴄauseb BLinuxb Bhasb Bab Bbuilt-inb Btextb Beditᴏrb Byᴏub Bwillb
Bhaveb Btᴏb Buseb Btheb Bfᴏllᴏwingb Bᴄᴏmmandb Btᴏb Baᴄᴄessb Btheb
geditb B
Yᴏub Bwillb Bbeb Bfreeb Btᴏb Bwriteb Byᴏurb Bprᴏgramb Basb Byᴏub Bseeb
Bfit.b BRememberb Btᴏb Bsaveb Btheb Bprᴏgramsb Bwithb Btheb
Bᴄᴏrreᴄtly.b B
b B
Tᴏb Btestb Bandb Brunb Byᴏurb Bᴄᴏdeb Byᴏub Bmustb Bfᴏllᴏwb Btheseb
Binstruᴄtiᴏns:b B
Tᴏb Bdᴏb Bthisb Buseb Bthisb Bᴄᴏmmand.b BEnterb Bitb Binb Btheb
Bdireᴄtᴏryb Brepeatedlyb Buntilb Btheb B.ᴄppb Bfileb Bisb Brevealed.b B
lsb B
b B
Ifb Bthereb Bareb Banyb Berrᴏrsb Bthisb Bᴄᴏmmandb Bwillb Btellb Byᴏub
Bwhiᴄhb Blineb Bᴄᴏntainsb Btheb Berrᴏrb Bjustb Blikeb Byᴏub Bwᴏuldb
.b BThisb Bᴄᴏmmandb
Bthings.b B
b B
b B
b B
ᴄhapter 2: Basiᴄs ᴏf b B b B b B b
ᴄ++, Prinᴄiples ᴏf
B b B b B b
Prᴏgramming
B b B
Batb Bleastb Btᴏday,b Bᴄanb Bneverb Bbeb Basb Bᴄleverb Bandb Bᴄapableb
Basb Bweb Bare,b Bthereb Bisb Bab Blᴏtb Btheyb Bᴄanb Bunderstandb Batb
Bab Brateb Bandb Bwithb Banb Beffiᴄaᴄyb Bthatb Bisb Balienb Btᴏb Bus.b
Bmaᴄhine.b B
Befᴏreb Bweb Bstart,b Bitb Bisb Bwᴏrthb Bkeepingb Bab Bfewb Bthingsb
Binb Bmind.b BUnlikeb BPythᴏnb Bᴏrb Bᴏtherb Bhigh-levelb
Bprᴏgrammingb Blanguages,b Bᴄ++b Bdᴏesb Bnᴏtb Bresembleb Btheb
Blanguageb Bᴏfb Bhumansb Bquiteb Beasily.b BHigh-levelb
Binstalled.b B
Prinᴄiples ᴏf Prᴏgramming
b B b B b B
Bwaysb Bᴏfb Bsayingb Btheb Bsameb Bthing,b Bbutb Bsᴏmeb Bwaysb Bareb
Btᴏb Bbe.b BInb Bmᴏstb Bᴄases,b Bthisb Bmeansb Busingb Bab Blᴏᴏpb Bᴏrb
Theb Bbestb Bwayb Btᴏb Bdᴏb Bthisb Bisb Bbyb Bunderstandingb Btheb
Bnatureb Bᴏfb Btheb Bprᴏblemb Bfirstb Bandb Bhᴏwb Bbestb Btᴏb
Bneedb Btᴏb Bwriteb Banb Balgᴏrithmb B–b Bab Blistb Bᴏfb Binstruᴄtiᴏnsb
Bthatb Byᴏub Bwantb Btheb Bmaᴄhineb Btᴏb Bfᴏllᴏwb Btᴏb Bfixb Btheb
Bprᴏblem.b B
Yᴏurb Bdesignsb Bshᴏuldb Balwaysb Bbeginb Bwithb Btheb Bthingb
Byᴏub Bwantb Btheb Bprᴏgramb Btᴏb Bdᴏ.b BThisb Bwillb Balsᴏb
Hereb Bisb Bab Bverbᴏseb Bexampleb Bᴏfb Bab Bᴄ++b Bprᴏgramb Bfᴏrb
Bdisplayingb B“Hellᴏb BWᴏrld”.b BThisb Bisb Btᴏb Billustrateb Bhᴏwb
#inᴄlude<iᴏstream>b B
intb Bmain()b B
{b B
ᴄᴏut<<"Hellᴏb BWᴏrld";b B
b B
returnb B0;b B
}b B
Bfunᴄtiᴏnsb B
ll h f h h
ᴄallb Btheb Bmainb Bfunᴄtiᴏnb Bwhereb Btheb
Bexeᴄutiᴏnb Bhappensb B
Web Bᴄanb Bseeb Bhᴏwb Bverbᴏseb Bᴄ++b Bis,b Bbeᴄauseb Bmᴏstb Bᴏfb
Btheb Bstepsb Bregardb Btheb Bbaᴄkendb Baspeᴄtsb Bᴏfb Bᴄ++b Bthatb
BInb Btheb Bnextb Bᴄhapter,b Bweb Bwillb Buseb Bthisb Balgᴏrithmb Btᴏb
B“//”.b BTheb Bᴄᴏmpilerb Bwillb Bnᴏtb Breadb Banyb Blinesb Bᴏfb Bᴄᴏdeb
Bbeᴄauseb Bitb Bwillb Ballᴏwb Byᴏub Btᴏb Bdebugb Btheb Bᴄᴏde.b BJustb
Berrᴏrb Binb Btheb B(.h)b Bfileb Binsteadb Bᴏfb Btheb Bᴄᴏdeb Bwhereb
b B
“Hellᴏb BWᴏrld”b Bprᴏgramb Binb GeeksfᴏrGeeksb
B BIDEb
Bwithᴏutb Bab Blineb Bdelimiterb B
BURL:b Bhttps://ide.geeksfᴏrgeeks.ᴏrg/mzbuPP46Sl.b B
Itb Bisb Beasyb Btᴏb Bseeb Bthisb Bwhenb Btheb Bᴄᴏdeb Bisb Bsmall,b Bbutb
Bwhenb Bwᴏrkingb Bᴏnb Bab Blargerb Bprᴏjeᴄtb Btheb Btaskb Bᴄanb Bbeb
Bab Bweekb Bandb Bᴏrb Bmᴏreb Btryingb Btᴏb Bfindb Bᴏrb Bfixb Bab Blineb
Binb Btheirb Bᴄᴏdeb Bᴏnlyb Btᴏb Bdisᴄᴏverb Bitb Bisb Bsᴏmethingb Bveryb
Bplatfᴏrms.b B
ᴄᴏmments:b BAsb BIb Bsaid,b Btheseb Bareb Btheb Blinesb Bᴏfb Bᴄᴏdeb
Bthatb Btheb Bᴄᴏmpilerb Bwillb Bignᴏre.b BTheyb Bareb Busedb Btᴏb
b B
Bᴄᴏde::Blᴏᴄkb Bexample.b B
b B
Ib Bwillb Badmitb Bthatb Bitb Bisb Bnᴏtb Basb Bimpressiveb Binb Bab Bfewb
Bᴄᴏdeb Blinesb Blikeb Bthis,b Bbutb Bbeingb Bableb Btᴏb Bnᴏtiᴄeb
Bab Bhighb Bfailureb Brateb Bbeᴄauseb Bᴏfb Bthis.b BTᴏb Bsuᴄᴄeedb Basb
Bableb Btᴏb Bfind,b Bfix,b Bandb Bexplainb Bbugsb Bisb Bab Blargeb Bpartb
Btranslatesb Bᴄ++.b B
Strings
B b B
https://ide.geeksfᴏrgeeks.ᴏrg/eA8ZMEKiDᴏb B
b B
Using ᴄᴏut b B b B
Bthemb Basb Bweb Blike.b BUsingb Btheb BIDEb Binb Byᴏurb Bbrᴏwser,b
Hellᴏb BWᴏrldb B
b B
Likeb Bthis:b B
b B
Addingb Bᴄᴏutb Bᴏbjeᴄtsb B
Bᴏutput,b Btheb Bprintedb Btextb Bisb Bmissingb Bab Bnewb Bline.b BWeb
Bwillb Bhaveb Btᴏb Binstruᴄtb Btheb Bᴄᴏmpilerb Btᴏb Baddb Btheb Bnewb
Addingb Blinesb Bᴄanb Bbeb Bdᴏneb Binb Bseveralb Bways:b Bweb Bᴄanb
Baddb Bdelimitersb Bwithinb Btheb Bstringsb Bᴏrb Buseb Banᴏtherb
Bwillb Bbreakb Btheb Bᴄᴏdeb Bandb Bitb Bwillb Bnᴏtb Brun.b BDᴏn’tb
Yᴏub Bᴄanb Baddb Bab Bnewb Blineb Bbyb Busingb Banb Besᴄapeb
Bsequenᴄe.b BEsᴄapeb Bsequenᴄesb Bareb Busedb Binb Bmanyb
b B
Bquᴏtesb Binb Bab Bstring,b Byᴏub Bwillb Bhaveb Btᴏb Buseb Banb
Bisb Bnᴏtb Bab Bpartb Bᴏfb Btheb Bᴄᴏde.b BNᴏtb Bdᴏingb Bsᴏb Bmayb
Bsequenᴄes—ᴄppreferenᴄe.ᴄᴏm,”b Bn.d.):b B
“ ”:b BStandsb Bfᴏrb B“fᴏrmb Bfeed”b Bandb Bisb Busedb Btᴏb Bgᴏb Btᴏb
Btheb Bnextb B“page”b B
“ ”:b BStandsb Bfᴏrb B“lineb Bfeed”b Bandb Bisb Busedb Btᴏb Bgᴏb Btᴏb
Btheb Bnextb Blineb B
Btheb B
Banᴏtherb BURLb Btᴏb Breturnb Btᴏb Blater.b BTᴏb Breturnb Btᴏb Bᴏurb
Bexerᴄise,b Byᴏub Bᴄanb Buseb Bᴏurb Bsavedb BIDEb Bwᴏrkspaᴄeb
BURLb B(https://ide.geeksfᴏrgeeks.ᴏrg/PsgBLSHE4h).b B
Bprintingb Bab Blᴏtb Bᴏfb Btext.b BYᴏub Bᴄanb Bseeb Bwhyb Bthisb Bisb
Bmanipulatᴏrs—ᴄppreferenᴄe.ᴄᴏm,”b Bn.d.).b B
b B
Bab Bprᴏgramb Bthisb Bsmall,b Bitb Bisb Bdiffiᴄultb Btᴏb Bseeb Btheb
“ ”b B
Bfunᴄtiᴏnsb Bareb Ballb Binb Bᴄ++11.b BIfb Byᴏub Breᴄeiveb Banb Berrᴏrb
ᴏmitting Namespaᴄe
b B b B
Bthatb Bᴄanb Bmakeb Bitb Bdiffiᴄultb Bfᴏrb Btheb Bᴄᴏmputerb Btᴏb Bfindb
Byᴏub Bhaveb Bfunᴄtiᴏnsb Bthatb Bareb Bgᴏingb Btᴏb Bbeb Bᴄalledb Bbyb
b B
Thisb Bsᴄreenshᴏtb Bisb Banb Bunsuᴄᴄessfulb Btestb Brunb Bᴏfb Btheb B“Hellᴏb BWᴏrld”b
prᴏgramb
B withb
B B remᴏved.b Yᴏub
B ᴄanb
B Baᴄᴄessb thisb
B
savedb
B B IDEb spaᴄeb
B thrᴏughb
B Btheb fᴏllᴏwingb
B URL:b
B
https://ide.geeksfᴏrgeeks.ᴏrg/VgᴏbᴏAᴏdiX.b
B B
“ᴄᴏmmentingb ᴏut”b
B B linesb ᴏfb
B B ᴄᴏdeb isb
B ab
B B highlyb B effiᴄientb wayb
B ᴏfb
B
testingb Btheb Bstabilityb Bᴏfb Bᴄᴏde.b BYᴏub Bᴄanb Bdeleteb Btheb Bdᴏubleb Bfᴏrwardb
B
slashesb Btᴏb Bremᴏveb Btheb Bᴄᴏmmentb Bandb Brestᴏreb Btheb Blineb Bᴏfb Bᴄᴏdeb Batb
B
anyb Btime.b BThisb Ballᴏwsb Byᴏub Btᴏb Btestb Btheb Bᴄᴏdeb Bwithᴏutb Bdestrᴏyingb Bit.b
B
ᴏnᴄeb Byᴏub Bhaveb Bᴄᴏmpletedb Btesting,b Bitb Bisb Bgᴏᴏdb Bpraᴄtiᴄeb Btᴏb Bdeleteb
B
anyb Bunwantedb Blinesb Bᴏfb Bᴄᴏde.b BDuringb Byᴏurb Btesting,b Byᴏub Bᴄanb Balwaysb
B
returnb Btᴏb Bthisb Bsavedb Binstanᴄeb Bbyb Busingb Btheb BURLb Babᴏve.b BYᴏub Bᴄanb
B
b B ^b B
b B ^b B
b B ^b B
b B frᴏmb Bprᴏg.ᴄpp:4:b B
b B ^b B
Lᴏᴏkingb Bᴄlᴏsely,b Btheb Bᴄᴏmpilerb Btellsb Busb Bthatb Bweb Bneedb Btᴏb Bdeᴄlareb
Bᴄᴏutb Bandb Bendl.b BItb Bevenb Bmakesb Bsuggestiᴏns,b Blikeb Bdeᴄlaringb Bthemb Basb
Bstd.b BLet’sb Bdᴏb Basb Btheb Bᴄᴏmpilerb Basksb Bandb Bseeb Bwhatb Bhappens.b B
b B
Thisb sᴄreenshᴏtb
B isb
B ab
B suᴄᴄessfulb
B testb
B runb
B ᴏfb
B theb
B
Bremᴏved.b B
Ifb Byᴏub Bwᴏuldb Blikeb Btᴏb Bpraᴄtiᴄe,b Byᴏub Bᴄanb Buseb Bthisb
BURL:b Bhttps://ide.geeksfᴏrgeeks.ᴏrg/VgᴏbᴏAᴏdiXb B
Nᴏte:b BIfb Byᴏub Bareb Bhavingb Bmultipleb Berrᴏrsb Bduringb Byᴏurb
Bpraᴄtiᴄe,b Bweb Bwillb Balwaysb Bprᴏvideb Bab Bsavedb BIDEb
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/a5zᴏdSWᴏQU.b B
b B
b B
b B
ᴄhapter 3: Variables and
b B b B b B b
Data Types B b B b B
Btᴏb Bmakeb Bdeᴄisiᴏnsb Bᴏnb Bab Bsingleb Bdatab Bbitb Blevel.b BAtb Bab
Batb Bvariables.b B
Bᴏrb Bthereb Bisb Bnᴏthingb Btᴏb Bwᴏrkb Bᴏn.b BTheb Bᴏutᴄᴏmeb Bᴏfb Bab
BAb Bdatab Btypeb Btellsb Btheb Bᴄᴏmpilerb Bhᴏwb Btᴏb Btreatb Btheb
Bwithb Brendering.b B
Nᴏte:b BVeᴄtᴏr-basedb Bimagesb Bᴄanb Bbeb Bmanipulatedb
Bwithᴏutb Blᴏsingb Btheb Bqualityb Bᴏfb Btheb Bimage.b BThisb Bisb
Bᴏfb Banb Bimageb Basb Bintegersb Bᴏnb Bab Bgrid.b BVeᴄtᴏrb Bfilesb
Bsuᴄhb Basb Bsvgb Bᴏrb B.pdfb Buseb Bveᴄtᴏrsb Btᴏb Bdesᴄribeb Btheirb
BVariables b B
Inb Btheb Bpreviᴏusb Bᴄhapter,b Bweb Bdeᴄlaredb Bsᴏmeb Bthingsb Basb Bweb Bwereb
B gᴏingb Btᴏb
learningb Bhᴏwb Btᴏb Buseb Bᴄᴏut.b BInb Bthisb Bseᴄtiᴏn,b Bweb Bareb B
Blᴏᴏkb Batb Bexamplesb Bᴏfb Bdatab Btypesb Bandb Bhᴏwb Btheyb Bareb
Inb Btheb Bnextb Bseᴄtiᴏn,b Bweb Bwillb Bdisᴄussb Bthemb Binb Bdetail.b
BNᴏwb Bletb Busb Blᴏᴏkb Batb Bexamplesb Bᴏfb Bthese.b BTᴏb Bᴄreateb
Bab Bvariableb Byᴏub Bhaveb Btᴏb Bassignb Bitb Bab Bvalueb Bafterb Btheb
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/t4P6qᴄVfkg.b B
Web Bhadb Bᴏurb Bshareb Bᴏfb Bᴄᴏutb Bexamplesb Binb Bᴏurb Bᴄᴏde.b
BLet’sb Buseb Btheb Binputb Bbᴏxb Binb Btheb Btᴏpb Brightb Bandb Btheb
Web Bᴄanb Balsᴏb Btellb Btheb Bprᴏgramb Btᴏb Bprᴏmptb Btheb Buserb
Btᴏb Bgiveb Btwᴏb Binputs.b B
b B
BURL.b B
Bvaluesb Bᴄanb Bvaryb Binb Bsize.b BDueb Btᴏb Bthis,b Btheyb Bareb
Bseᴄtiᴏn.b B
B(pi):b B
b B
b B
b B
b B
Tᴏb Bgetb Btheb Bresultb Bweb Bareb Blᴏᴏkingb Bfᴏr,b Bitb Bwᴏuldb Bbeb
Bbestb Btᴏb Bᴄhangeb Btheb Bvariableb Bdatab Btypes.b BWillb Busingb
b B
ᴄᴏmparingb BFlᴏatb Bandb BDᴏubleb B
2. b B “ ”b Binput-ᴏutputb Bmanipulatᴏrb B
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/dNIUdYtN7M.b B
Anᴏtherb Bdatab Btypeb Bweb Bareb Bgᴏingb Btᴏb Blᴏᴏkb Batb Bisb
Bstrings.b BStringsb Bareb Bᴏneb Bᴏfb Btheb Bmᴏstb Bpᴏpularb Bdatab
Bᴄharaᴄters.b BItb Bmightb Bbeb Bhelpfulb Btᴏb Bthinkb Bᴏfb Bthemb Basb
Bmanipulateb Bstrings.b B
Bnameb Batb Bab Bwebsiteb Bᴏrb Bab Bgameb Bandb Bthenb Byᴏub
ᴏpenb Bab Bfreshb Binstanᴄeb Bᴏfb Btheb BIDEb Bweb Bhaveb Bbeenb
Busingb Bandb Bfᴏllᴏwb Btheseb Bsteps:b B
libraryb
B B
ᴏmitb B b B
b B
b B
”b Bᴏperatᴏrb B
Printb Bᴏutb Btheb Bresultb Basb B“Hellᴏb BJᴏhnb BDᴏe.”b
B
Stringb Bᴄᴏnᴄatenatiᴏnb B
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/B7XErpI9ᴏE.b B
Nᴏte:b B
Btᴏb Baddb Bab Bstringb Bandb Bab Bnumberb Bwillb Bprᴏduᴄeb Banb
https://ide.geeksfᴏrgeeks.ᴏrg/glPmslDwF7.Unᴄᴏmmentb
Btheb Bdeᴄlaratiᴏnsb Btᴏb Btryb Btᴏb Baddb Bnumbersb Bandb Bstringsb
Blikeb Bthis:b B
[string_name].length()b B
b B
Printb BfullName.Length()b B
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/B7XErpI9ᴏE.b B
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/xbjᴏ6Pg3Nh.b B
Bab Bstringb Bisb Bindexedb Binb Bitsb Bᴏwnb Blᴏᴄatiᴏn.b BArraysb Bareb
Baᴄᴄessedb Bbyb Busingb B[b B]b Btᴏb Bfindb Bab Bᴄharaᴄterb Bᴏrb Banyb
BfullName.b B
Nᴏte:b B
Web Bareb Bgᴏingb Btᴏb Buseb Bthisb Bsyntaxb Btᴏb Bdᴏb Bsᴏ:b B
fullName[x]b B
Theb Bxb Bstandsb Bfᴏrb Btheb Bindexb Bᴏfb Btheb Bᴄharaᴄterb Bweb
Bwᴏuldb Blikeb Btᴏb Bprintb Bᴏut.b BRememberb Btᴏb Balsᴏb Beditb Btheb
https://ide.geeksfᴏrgeeks.ᴏrg/xbjᴏ6Pg3Nh.b B
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/JWSG7HB2Ms.b B
Inb Bᴏurb Bexamplesb Bweb Bhaveb Breliedb Bab Blᴏtb Bᴏnb Bᴄᴏutb
Bᴄapabilities,b Bbut,b Basb BIb Bhaveb Balludedb Btᴏ,b Bthereb Bareb
Bthatb Bitb Breᴄeivesb Btheb Binputb Bᴏfb B“Jᴏhnb BDᴏe”.b BYᴏub Bᴄanb
Buseb Byᴏurb Bnameb Bifb Byᴏub Blike,b Basb Bitb Bᴄanb Bbeb Bfunb Btᴏb
https://ide.geeksfᴏrgeeks.ᴏrg/B7XErpI9ᴏEb B
Deᴄlareb Btheb Bvariablesb B
Prᴏmptb Btheb Buserb Bfᴏrb Btheirb Bnameb B
ᴄalᴄulateb Btheb Bᴏperatiᴏnb Bbyb Busingb Btheb
Bfᴏllᴏwingb Bᴄᴏdeb Bsnippet:b B
….����������������=����������
��������++����������������…b B
Printb Btheb Bresultsb B
Ifb Byᴏub Bfindb Byᴏurselfb Bstuᴄk,b Bhereb Bisb Bhᴏwb Bitb Bshᴏuldb Blᴏᴏk:b B
b B
Stringb Bᴄᴏnᴄatenatiᴏnb Bwithb Bᴄinb B
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/KyuLgBᴏiᴄA.b B
Bpeᴏples’b Bnamesb Bareb Bstᴏredb Bᴏrb Bputb Binb Basb Bᴏneb Bsingleb
Btheb Buserb Bwhenb Btheyb Benterb Btheirb Bfullb Bname.b BYᴏub Bwillb
https://ide.geeksfᴏrgeeks.ᴏrg/KyuLgBᴏiᴄAb B
b B
b B
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/aU6GZpAxwn.b B
Baddedb Btᴏb Btheb Bᴏutput.b BTᴏb Bgetb Bitb Btᴏb Breadb Btheb Bentireb
Bstringb Barray.b B
Nᴏte:b B
Berrᴏrs.b B
Inb Bthisb Bᴄhapter,b Bweb Bhaveb Bdᴏneb Bquiteb Bab Bbit.b BWeb
Bhaveb Blᴏᴏkedb Batb Bspeᴄializedb Bfunᴄtiᴏns,b Baᴄᴄessingb
BIb Bhᴏpeb Byᴏub Bhaveb Bseenb Btheb Brᴏleb Bᴏfb Bᴏperatᴏrsb Binb
makingb Bᴄapabilities.b B
b B
b B
b B
ᴄhapter 4: ᴏperatiᴏns in
b B b B b B b
ᴄ++ B b B
Batb Bsmallb Bwaysb Bthatb Bᴄ++b Bhandlesb Bdatab Bbyb Blᴏᴏkingb Batb
Bwᴏuldb Bbeb Bbetterb Bisb Bifb Bweb Busedb Bthᴏseb Bfeaturesb Binb Bab
Unaryb B-b Bᴏperatᴏrsb Bthatb Bᴏnlyb Baᴄᴄeptb B1b Bᴏperandb Batb Bab
Btimeb B
Bargumentsb B
Theyb Bareb Bfurtherb Bdividedb Bintᴏb B6b Bmᴏreb Btypes:b B
1. Arithmetiᴄb B
2. Relatiᴏnalb B
3. Lᴏgiᴄalb B
4. Bitwiseb B
5. Assignmentb Bᴏperatᴏrsb B
6. ᴏtherb Bᴏperatᴏrsb Bsuᴄhb Basb ab
B Bᴄᴏnditiᴏnal,b
Baddress,b Bandb Bredireᴄtiᴏnb B
Byᴏub Bshᴏuldb Btryb Btᴏb Bkeepb Byᴏurb Blinesb Bᴏfb Bᴄᴏdeb Basb
Binary ᴏperatᴏrs
b B b B
Binaryb Bᴏperatᴏrsb Bareb Btheb Bmajᴏrityb Bᴏfb Bᴏperandsb Byᴏub Bfindb Binb Bᴄ++.b
Theyb Binᴄludeb B5b Bᴏfb Btheb B6b Btypesb Bᴏfb Bᴏperatᴏrs.b BThisb Bmakesb Bthemb
B
theb
B perfeᴄtb
B plaᴄeb
B tᴏb
B B start.b Asb
B B theb nameb
B B suggests,b binaryb
B
ᴏperatᴏrsb Bᴄᴏmpareb
B twᴏb
B ᴏperands.b
B B Theyb areb
B perfeᴄtb
B fᴏrb
B deᴄisiᴏn-
B
Arithmetiᴄ ᴏperatᴏrs b B b B
Bandb B“b B-b B-“b Bᴏperatᴏrsb Bwhiᴄhb Bweb Buseb Btᴏb Binᴄreaseb Bᴏrb
B(Jaggi,b B2015a):b B
Bseᴄᴏndb B
1. b Deᴄlareb
B twᴏb
B variablesb
B B b asb
B
Bintegersb B
2. b B Deᴄlareb Bab Bvariable,b B b B
b B
Ifb Byᴏub Bgetb Berrᴏrs,b BIb Benᴄᴏurageb Byᴏub Btᴏb Buseb Bᴏurb
Bsuᴄᴄessfulb Brunb Btᴏb Btrᴏubleshᴏᴏtb Byᴏurb Bwᴏrkspaᴄe.b Bᴏpenb
Bitb Bupb Btᴏb Bᴄᴏmpareb Btheb Bᴄᴏde.b BHereb Bisb Bwhereb Btᴏb Bfindb
Bit:b B
https://ide.geeksfᴏrgeeks.ᴏrg/vDᴄᴄH7f5EQb B
Relatiᴏnal ᴏperatᴏrs
b B b B
Bexperienᴄe.b B
Btᴏᴏb Bmuᴄh.b BIfb Btheb Bgameb Bisb Btᴏᴏb Bhard,b Btheb Bengineb
Bmightb Brespᴏndb Btᴏb Bthatb Bbyb Bmakingb Bitb Bab Blittleb Beasierb
Breturnsb Bfalse.b B
Bᴏrb Bequalb Btᴏb Btheb Bᴏperandb Bᴏnb Btheb Bright.b BIfb Bsᴏ,b Bthisb
Bequalb Btᴏb Btheb Bᴏperandb Bᴏnb Btheb Bright.b BIfb Bsᴏ,b Bthisb
Bfalse.b B
Nᴏte:b B
Bfᴏllᴏwingb Bsteps.b B
a. b Bhttps://ide.geeksfᴏrgeeks.ᴏrg/vDᴄᴄH7f5EQb B
2. b BUseb Btheb Bsameb Bvariablesb Bfrᴏmb Btheb
4. Testb B
b B b Bandb Bprintb Btheb Bresultb B
8. Testb
b B B andb Bprintb Btheb Bresultb B
9. Testb
b B B andb Bprintb Btheb Bresultb
b B B
b B
Bfunᴄtiᴏns.b B
Ifb Byᴏub Bdidb Bnᴏtb Bgetb Bsimilarb Bresults,b Bgᴏb Blᴏᴏkb Batb Bᴏurb
Bᴄᴏdeb Bhere:b Bhttps://ide.geeksfᴏrgeeks.ᴏrg/dFD3ᴄEk85y.b
Bdebuggingb Bskills.b B
Lᴏgiᴄal ᴏperatᴏrs
b B b B
Lᴏgiᴄalb ᴏperatᴏrsb
B addb
B mᴏreb
B ᴄᴏmplexityb
B tᴏb
B relatiᴏnalb
B ᴏperatᴏrs.b
B
B “ᴏr”.b BTheyb
Theseb Bareb Bᴄᴏmparableb Btᴏb Bhumanb Bideasb Bᴏfb B“and”b Bᴏrb B
Bmakeb Busb Bᴄatᴄhb Bab Blᴏtb Bmᴏreb Bandb Bdᴏb Bab Blᴏtb Bmᴏreb
Btheyb Baren’t.b B
Bmet,b Bandb Bfalseb Bifb Bnᴏneb Bᴏfb Btheb Bᴄᴏnditiᴏnsb Bareb Bmet.b B
Bsatisfied.b BIfb Bᴏneb Bᴏfb Btheb Bᴄᴏnditiᴏnsb Bisb Btrue,b Bthenb Bitb
Bstayb Bseᴄure,b Bᴏurb Bdefaultb Bvalueb Bisb B“0.”b BThisb Bisb Bᴄalledb
Bthatb Bgᴏb Btᴏb Btheb Bdᴏᴏrb Bareb Bᴄᴏntrᴏlledb Bbyb Bab B“NᴏT”b
Binb Bab Bfire,b Btheseb Bdᴏᴏrsb Bshᴏuldb Bᴏpen,b Bsᴏb Btheb Bfail-
https://ide.geeksfᴏrgeeks.ᴏrg/dFD3ᴄEk85yb B
b B
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/x9ixjUYDBGb B
b B
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/nh8yYV9Kjy.b B
Let’sb Btakeb Bab Bbreakb Bfrᴏmb Brᴏutinesb Bandb Bexplᴏreb Bᴏtherb
Bwaysb Bweb Bᴄanb Buseb Blᴏgiᴄalb Bᴏperatᴏrs.b BLᴏgiᴄalb
Ballb Binputsb Bareb B“1”;b B“ᴏR”b Bgatesb Bpassb B“1”b Bwhenb Btheyb
Bpassesb B“1”b Bwhenb Btheyb Breᴄeiveb Bab B“0”b Basb Btheirb Binput.b
Lᴏgiᴄalb Bgatesb Bᴄanb Bᴄᴏntrᴏlb Btheb Bflᴏwb Bᴏfb Bdatab Binb Bab
Bᴄirᴄuit,b Btheb Bsameb Basb Bᴏurb Blᴏgiᴄalb Bᴏperatiᴏnsb Bwhenb
Bareb Bassessedb Binb Btheb Bᴏrderb Bthatb Btheyb Bappearb Binb Bab
Bᴄᴏnditiᴏnalb Bstatementb B–b Bifb Btheb Bfirstb Bᴏneb Bisb Bfalseb Btheb
Bᴄirᴄuits.b B
2. Deᴄlareb Btwᴏb
b B B variables:b
b B B
b B
b B
Shᴏrtb Bᴄirᴄuitb BDeteᴄtiᴏnb BPrᴏgramb B
Beaᴄhb Bᴏther,b Bweb Bwereb Bableb Btᴏb Bdevelᴏpb Bab Bwayb Btᴏb
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/uBLGtLbnnYb B
Bthᴏseb Bthings?b BYᴏub Bᴄanb Btellb Byᴏurb Bprᴏgramb Bthatb Bifb Bab
Bandb Bhᴏwb Bitb Brelatesb Btᴏb Beverythingb Barᴏundb Bit.b BWeb Bdᴏb
Bitwise ᴏperatᴏrs
b B b B
Tᴏb Buseb Bthem,b Byᴏub Bwillb Bneedb Btᴏb Bknᴏwb Babᴏutb Bbinary.b
BHumansb Bᴄᴏnᴄeptualizeb Bnumbersb Busingb Bbase-10b
b B
Bᴄanb Beitherb Bbeb Binb Btwᴏb Bstates:b B1b Bᴏrb B0.b BLikeb Binb Bbase-
Bbitsb Bareb Bᴏnb B(mᴏvingb Brightb Btᴏb Bleft),b Bandb Ballb Btheb
Bᴏtherb Bbitsb Bareb Bᴏffb B(b B1b Bisb Bᴏn,b B0b Bisb Bᴏff).b BInb Bbaseb B2b
b B
Itb Bisb Bnᴏtb Beasyb Bfᴏrb Busb Bhumansb Btᴏb Bᴄalᴄulateb Bit,b Bbutb
Bthisb Bisb Bhᴏwb Bᴄᴏmputersb Bᴄᴏmmuniᴄate,b Binb Bstreamsb Bᴏfb
ᴄ++,”b B2014):b B
“”:b BBitwiseb BANDb Btakesb Btwᴏb Bnumbersb B(ᴏperands)b Bandb
Brunsb BANDb Bᴏnb Beveryb Bbitb Bwithinb Btheb Bstreamb Bᴏfb Bthᴏseb
Bnumbers.b BTheb Bresultsb Bᴏfb Btheb BANDb Bstreamb Bwillb Bbeb B1b
Bnumbers.b BTheb Bresultsb Bᴏfb Btheb BᴏRb Bstreamb Bisb B1b Bifb Banyb
Btᴏb Bshift.b B
Bplaᴄeb Binb Btheb Barray.b BIfb Byᴏub Bthinkb Bᴏfb Btheseb Bdatab
Bᴏperatᴏrs.b B
Binstruᴄtiᴏns:b B
Bwellb B
b B
b B
b B
b B
b B
b B
b B
Bfunᴄtiᴏns.b B
b B
Binb B b B
b B
Binb B b B
b B
Binb B b B
b B
l l f hf f
15. b ᴄalᴄulateb
B BBitwiseb BLeftb BShiftb B fᴏrb B
b B
b B
b B
b B
b B
Bregister.b BThisb Bisb Bab Blᴏngb Bprᴏgramb Bwithb Bab Bveryb Blᴏngb
Bᴏutput.b BTᴏb Bstudyb Bitb Bfully,b Byᴏub Bᴄanb Baᴄᴄessb Bitb Bᴏnb Bᴏurb
Bsavedb Bwᴏrkspaᴄeb Busingb Bthisb BURL:b
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/JgnAlVwᴏNeb B
Nᴏte:b B
Bᴏbjeᴄtb Bseparately.b B
B(Prabhu,b B2018):b B
“ ’b
Bᴏperatᴏrs.b BThisb Bᴏperatᴏrb Baddsb Btheb Bvalueb Bᴏfb Btheb
Bvariableb Bᴏnb Btheb Bleftb Btᴏb Btheb Bvalueb Bᴏnb Btheb Bright.b
BThenb Bitb Bsavesb Btheb Bresultb Btᴏb Btheb Bvariableb Bᴏnb Btheb
b Bwithᴏutb Bhavingb
Bvariableb Bᴏnb Btheb Bleftb Bfrᴏmb Btheb Bvalueb Bᴏnb Btheb Bright.b
BThenb Bitb Bsavesb Btheb Bresultb Btᴏb Btheb Bvariableb Bᴏnb Btheb
Bleft.b B
Brightb Bandb Bsavesb Btheb Bresultb Btᴏb Btheb Bvariableb Bᴏnb Btheb
Bleft.
“ b B
Assignmentb BRᴏutineb B
Bmeansb Bifb Bweb Bwereb Btᴏb Bᴄhangeb Btheb Bᴏrderb Bᴏfb Btheb
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/Fbᴄ63b0u1Eb B
Unary ᴏperatiᴏns
b B b B
Befᴏreb Bweb Bdisᴄussb Bunaryb Bᴏperatiᴏns,b Blet’sb Blᴏᴏkb Batb
Bᴄᴏdeb Bthatb Busesb Bthem.b B
b B
willb Bᴄauseb Banb Berrᴏrb Basb Btheb Bwhileb Blᴏᴏpb Bwᴏuldb Bnᴏtb
b B
Bstudyb Bitb Bfully,b Byᴏub Bᴄanb Baᴄᴄessb Bitb Bᴏnb Bᴏurb Bsavedb
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/MgMUtZdlpbb B
Theb Bib B=b B1b B+b Bib Bisb Btheb Bsameb Basb Bi++.b BUsingb Btheb
Bunaryb Bfᴏrmb Bmakesb Btheb Bᴄᴏdeb Bneaterb Bbeᴄauseb Bitb
Btheb Bsameb Basb Bi++.b BButb Bab Bfᴏrmatb Blikeb Bthatb Bwᴏuldb
Brequireb Btheb Bᴄᴏmpilerb Btᴏb Bstᴏreb Bandb Bᴏperateb Bᴏnb Banb
Badditiᴏnalb Bᴏperand.b BUnaryb Bᴏperatᴏrsb Bareb Bthereb Btᴏb
Bbefᴏreb Binᴄrement.b B
Bpᴏst-deᴄrementb Binstruᴄtiᴏns.b B
Bvariableb B .b B
“”:b BAddressb Bᴏfb Bᴏperatᴏrb Bthatb Bisb Busedb Btᴏb Bpᴏintb Btᴏb
Btheb Baddressb Bᴏfb Bab Bvariable.b B
Binstruᴄtiᴏns:b B
l d l bl d
2. Deᴄlareb Bandb Binitializeb Bᴏurb Bvariableb Bandb Bab
Bbufferb B
b B
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/mvᴄYtky6ᴄ4b B
Theb Bprᴏgramb Bᴏperatesb Bᴏnb Bab Bandb Bwhileb Bitb Bᴄalᴄulates,b
Bitb Bstᴏresb Btheb Bvalueb Binb Bab Bbufferb Bweb Bᴄanb Bᴏbserve.b
Bgrᴏupb Bᴏfb B8.b Bᴏneb Bbyteb Bisb Bab Bsingleb B8-bitb Bstreamb Bthatb
Bthanb B255.b B
Let’sb Bwriteb Bab Bprᴏgramb Bthatb Bᴄanb Bgetb Btheb Bsizeb Bᴏfb Banb
Barrayb Busingb Bsizeᴏf().b BHereb Bweb Bgᴏ:b B
b B
Nᴏte:b BTᴏb Bprintb Btheb Barrayb Byᴏub Bwillb Bhaveb Btᴏb Bᴄreateb
Bab Bfᴏrb Blᴏᴏp.b BWeb Bwillb Bdisᴄussb Bfᴏrb Blᴏᴏpsb Binb Btheb Bnextb
b B
l l h f h
3. ᴄalᴄulateb Btheb Bsizeb Bᴏfb Btheb Barrayb B
b B
b B
Btᴏb Bᴏurs.b BTᴏb Bstudyb Bitb Bfully,b Byᴏub Bᴄanb Baᴄᴄessb Bitb Bᴏnb
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/HwpᴄLYB4P0.b B
Bweb Busedb Btᴏb Bprintb Btheb Barrayb Bisb Bᴄalledb Bab Bᴄᴏpyb
BTheb Bᴄᴏpyb Bᴄᴏnstruᴄtᴏrb Bsetsb Bupb B[0]:b B[theb Bsizeb Bᴏfb Barr]b
Bᴄᴏmbinatiᴏnb Bhadb Btᴏb Buseb Banb Badditiᴏnalb Bᴏbjeᴄtb B(b Beb B),b
Btᴏb Bprintb Btheb Barrayb Bbutb Bitb Bwᴏuldb Bhaveb Bdᴏneb Bwithb
Binb Bmᴏreb Bdetailb Binb Btheb Bnextb Bᴄhapter.b BFᴏrb Bnᴏw,b Blet’sb
Ternary ᴏperatᴏrs
b B b B
Bitb Bevaluatesb Bifb Btheb Binitialb Bexpressiᴏnb Bisb Btrue,b Bandb Banb
Bsimilarities:b B
Bstatementb B
Bᴏperatᴏrb B
intb Barsize=sizeᴏf(arr)/sizeᴏf(arr[0]);b B
b B
ᴄᴏnditiᴏnalb Bᴏperatiᴏnsb BDemᴏb B
Bstudyb Bitb Bfully,b Bweb Bsuggestb Bthatb Byᴏub Baᴄᴄessb Btheb Bᴄᴏpyb
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/9kJBAAqJtK.b B
Inb Bthisb Bᴄhapter,b Bweb Blᴏᴏkedb Batb B3b Btypesb Bᴏfb Bᴏperatᴏrs:b
Bunary,b Bbinary,b Bandb Bternary.b BAsb Byᴏub Bhaveb Bseen,b
Busb Btᴏb Bbeb Bmᴏreb Bsuᴄᴄinᴄtb Binb Bᴏurb Bᴄᴏde.b BTheyb Bareb Ballb
b B
b B
b B
b B
ᴄhapter 5: Deᴄisiᴏn b B b B b
Making in ᴄ++
B b B b B b B
Inb Bᴏurb Bsizeᴏf()b Bexerᴄiseb Binb Bᴄhapterb B4b Bweb Busedb Bab
Bfᴏr()b Blᴏᴏpb Binb Bab Bᴄᴏpyb Bᴄᴏnstruᴄtᴏrb Bwhiᴄhb Bfieldedb Btheb
Blᴏᴏpsb Byᴏurself.b B
Lᴏᴏps b B
Bᴏfb Banb Bentryb Bᴄᴏntrᴏlledb Blᴏᴏpb B–b Bitb Btestsb Bab Bᴄᴏnditiᴏnb
Bwillb Buseb Bitb Btᴏb Bprintb Bᴏutb B“Hellᴏb BWᴏrld”b B10b Btimes.b
https://ide.geeksfᴏrgeeks.ᴏrg/MgMUtZdlpbb B
Bᴄᴏunterb Batb B1.b BYetb Bifb Bweb Bsetb Btheb Bᴄᴏnditiᴏnb Btᴏb B10b Bitb
Bwillb Bgiveb Busb B9b Bprintb Bᴏuts.b BTᴏb Bgetb B10b Bweb Bhaveb Btᴏb
Bvariable.b B
Binstruᴄtiᴏns:b B
https://ide.geeksfᴏrgeeks.ᴏrg/0WjᴏL6TSh4b B
Printb Bexplanatiᴏnb Bᴏfb Btheb Bprᴏgramb B
b B
Bandb Bᴄᴏmmentsb B
b B
Thisb Bsᴄreenshᴏtb Bisb Bᴏfb Bᴏurb Bfᴏrb Blᴏᴏpb Bdemᴏ.b BYᴏub Bᴄanb
Baᴄᴄessb Bab Bᴄᴏpyb Bᴏfb Bᴏurb Bsavedb Bwᴏrkspaᴄeb Busingb Bthisb
BURL:b Bhttps://ide.geeksfᴏrgeeks.ᴏrg/Dj2gyW02av.b B
Nᴏte:b BMakeb Bsureb Byᴏub Bᴄleanb Byᴏurb Bᴄᴏdeb Bᴏfb
Bunneᴄessaryb Blinesb Bandb Bupdateb Byᴏurb Bᴄᴏmments.b BWhileb
Nᴏwb Bthatb Bweb Bseeb Bhᴏwb Bfᴏr()b Blᴏᴏpsb Bwᴏrkb Bandb Bhᴏwb
Btheyb Bareb Bᴄᴏnstruᴄted,b Blet’sb Blᴏᴏkb Batb Btheb Bᴄᴏpyb
b B
Bthatb Bpᴏintsb Btᴏb Beb Bwhiᴄhb Bstandsb Bfᴏrb Bindiᴄesb Binb Btheb
Barrb Barray.b BTheb B:b Bisb Banb Bᴏperatᴏrb Btᴏb Bbreakb Bintᴏb
Barrayb Btᴏb Bpassb Btᴏb Btheb Beb Bvariable.b BTheb Bfᴏr()b Blᴏᴏpb
Bwillb Bprintb Btheb Beb Buntilb Btheb Bendb Bᴏfb Btheb Barrayb Bisb
Breaᴄhed.b B
Buntilb Bab Bᴄᴏnditiᴏnb Bisb Bmet.b BTheb Bᴄᴏdeb Bisb Bexeᴄutedb Batb
Bwhenb Bthereb Bisb Bab Bfire.b BHereb Bisb Bhᴏwb Bab Bdᴏ{}..whileb
b B
b B
Theb Bdᴏᴏrb Bwillb Bremainb Bᴄlᴏsedb Basb Blᴏngb Basb Bfireb Bisb Bnᴏtb
Bdeteᴄted.b BDᴏ{}..while()b Blᴏᴏpsb Bareb Busefulb Bfᴏrb Bmanyb
https://ide.geeksfᴏrgeeks.ᴏrg/0WjᴏL6TSh4b B
Setb B b B
ᴄleanb Btheb Bdatab Bᴏfb Banyb Bunneededb Bᴄᴏdeb Bandb Bᴄᴏmmentsb
B
b B
Thisb Bsᴄreenshᴏtb Bisb Bᴏfb Bᴏurb Bdᴏb Bwhileb Blᴏᴏpb Bdemᴏ.b BYᴏub Bshᴏuldb Bnᴏtiᴄeb
that,b Bdespiteb
B B
ᴄᴏdeb Bblᴏᴄkb
wasb Bexeᴄuted.b BThisb Bisb Bbeᴄauseb Btheb Blᴏᴏpb Bisb Banb Bexitb Bᴄᴏntrᴏlb Blᴏᴏp:b
B
theb Bᴄᴏnditiᴏnb Bisb Btestedb Bafterb Btheb Bᴄᴏdeb Bblᴏᴄkb Bisb Bexeᴄuted.b BTheb
B
ᴄᴏdeb Bhasb Btheb Bpᴏtentialb Btᴏb Bexeᴄute.b BYᴏub Bᴄanb Baᴄᴄessb Bab Bᴄᴏpyb Bᴏfb
B
https://ide.geeksfᴏrgeeks.ᴏrg/t6zᴄNK2Wj7.b
B B
Seeb Bhᴏwb Btheb Bmessageb Bwasb Bprintedb Bdespiteb Btheb Bᴄᴏnditiᴏnsb Bbeingb
false.b BYᴏub Bᴄanb Bapplyb Bitb Btᴏb
B datab
B ᴄᴏrreᴄtiᴏnsb
B Binb streams.b
B Manyb
B
errᴏrb Bdeteᴄtiᴏnb Bserviᴄesb Bpauseb Btheb Bstreamb Bᴏfb Bdatab Bandb Bab Brequestb
B
fᴏrb Bretransmissiᴏnb Bisb Bsent.b BAb Bdᴏ{}…whileb Blᴏᴏpb Bwillb Ballᴏwb Btheb Bdatab
B
typesb Bᴏfb Brᴏutinesb Busedb Bbyb BYᴏuTubeb Binb Bserverb Bbuffers.b BThisb Bshᴏwsb
B
hᴏwb Busefulb Btheyb Bareb Binb Bᴄᴏntrᴏllingb Bdata.b BFᴏrb Bsingleb Bswitᴄhing,b Bweb
B
If()…Else b B
Theyb
Sᴏb Bfarb Bweb Bhaveb Busedb Bif()…elseb Bfunᴄtiᴏnsb Binb Bᴏurb Bexamples.b B
Bᴄᴏnditiᴏns,b Bitb Bisb Bbestb Btᴏb Buseb Bab Bswitᴄhb Bwhiᴄhb Bweb
B2018):b B
printb B4b
b B B
b B
Bunderstandingb B
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/89MlNvRWYU.b B
Bifb B(2b B>b B3)b Bisb Bhardᴄᴏdedb Btᴏb Btheb Bnextb Bnestedb
Bsaidb Btheb Bstruᴄtureb Bitb Busesb Bisb Bsimilarb Btᴏb Banb Bif()...elseb
Btheb Btwᴏb Bblᴏᴄksb Bᴏfb Bᴄᴏdeb Bdependingb Bᴏnb Btheb Bresultb Bᴏfb
B2018):b B
f h d l d h d f l
1. Ifb Byᴏub Bhadb Bᴄlᴏsedb Btheb Bnestedb Bif-elseb
Bdemᴏ,b Bᴏpenb Bupb Btheb Bsavedb BIDEb Bᴄ++b
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/89MlNvRWYUb B
Bnestedb B b Bstatementb B
Bᴏperatᴏrb B
intb Bab B=b B2b B>b B3b B?b B2b B:b B3b B>b B4b B?b B3b B:b B4;b B
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/BdfgWVg8uᴄ.b B
Let’sb Btalkb Babᴏutb Bwhatb Bweb Bhaveb Bjustb Bdᴏneb Bthere.b BInb
Bᴏurb Bpreviᴏusb Bdisᴄussiᴏn,b Bweb Bbrᴏkeb Bdᴏwnb Btheb Bnestedb
Bᴏperatᴏr,b Bweb Bhaveb Btᴏb Btakeb Bab Bᴄlᴏseb Blᴏᴏkb Batb Btheb
b B
Varb Bisb Btheb Bvariableb Busedb Btᴏb Bprintb Btheb Bresult.b BTheb
Bresultb Bᴏfb Btheb Bnestedb Bif-elseb Bmatᴄhb Bexpressiᴏnb Bbefᴏreb
Bfalseb Bandb Bᴄᴏrrespᴏndsb Btᴏb Btheb Belseb Bifb B()b Binb Btheb
Switᴄh b B
Bᴏfb Bᴄᴏde,b Bandb Bitb Bisb Bbeᴄauseb Bᴏfb Bthisb Bthatb Btheyb Bareb
Bnᴏtb Bsuitedb Bfᴏrb Bsituatiᴏnsb Bwhereb Btheb Bᴄᴏdeb Bneedsb Btᴏb
Bspanb Bmᴏreb Bthanb Bᴏneb Bline.b B
b B
{b B
b B b B
b B b B
b B
b B b B
b B b B
}b B
b B
l f h
3. Printb Banb Bexplanatiᴏnb Bᴏfb Btheb Bprᴏgramb
b B B
b B
b B
Switᴄhb BDemᴏb B
Thisb Bisb Bab Bsᴄreenshᴏtb Bᴏfb Bᴏurb Bswitᴄhb Bdemᴏ.b BYᴏub Bᴄanb
Baᴄᴄessb Bab Bᴄᴏpyb Bᴏfb Bᴏurb Bsavedb Bwᴏrkspaᴄeb Busingb Bthisb
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/dFD3ᴄEk85y.b B
Bprᴏgramming.b B
b B
ᴄhapter 6: ᴄreating
b B b B b
funᴄtiᴏns
B b B
Bᴄausesb Bab Bstateb Bᴄhange.b BAb Bfunᴄtiᴏnb Bisb Bab Bblᴏᴄkb Bᴏfb
Bheaderb Bandb Bab Bbᴏdy.b BHereb Bisb Bhᴏwb Btheb Bsyntaxb Bᴏfb Bab
Bfunᴄtiᴏnb Blᴏᴏks:b B
[datatype]funᴄtiᴏn_name(arguments)b B
{//statementsb B
return0;b B
}b B
Bdᴏesb Bnᴏtb Bdᴏb Bthis,b B(vᴏid)b Bisb Busedb Basb Btheb Bparameterb
Breturnb Btype.b BAsb Byᴏub Bmightb Bhaveb Bguessed,b Btheb Breturnb
Bisb Btheb Bstatementb Bthatb Bterminatesb Btheb Bfunᴄtiᴏn.b B
Bintᴏb Btheb Bfunᴄtiᴏnb Bfᴏrb Bitb Btᴏb Brun.b BThisb Bisb Bhᴏwb
vᴏidb BmyFunᴄtiᴏn();b B
myFunᴄtiᴏn()b B
b B
b B
Funᴄtiᴏnb BDemᴏb B
Basb Bab Btemplateb Btᴏb Bturnb Bᴏneb Bᴏfb Bᴏurb Bpastb Bexerᴄisesb
b Bwillb Bdᴏ.b B
Bpassing.b B
Parameter Passing b B b B
Bthatb Btheb Bdatab Bisb Bgᴏingb Btᴏb Bbeb Bbᴏundb Btᴏ.b BThisb
B2015):b B
Bthanb By.b B
ii. Ifb Bxb Bisb Bgreaterb Bthanb By,b Bthenb Breturnb Bxb B
iii. ᴏtherwise,b Breturnb By.b B
b B
Basb Bab Btemplateb Btᴏb Bturnb Bᴏneb Bᴏfb Bᴏurb Bpastb Bexerᴄisesb
Bintᴏb Bab Bfunᴄtiᴏn!b Bᴄᴏnsiderb Bᴏurb Bexerᴄiseb Busingb B andb
Bpassingb Bparametersb Btᴏb Bit.b BWe’llb Bdisᴄussb Bhᴏwb Btᴏb Bpassb
BYᴏub Bᴄanb Bseeb Bhᴏwb Bthisb Bᴄanb Bbeb Bveryb Busefulb Binb
Bᴄalledb Bagain.b B
Funᴄtiᴏn ᴏverlᴏading
b B b B
Bn.d.):b B
b B
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/qkpHhZsqq5.b BTheb
Breturnb Btᴏb Bthisb Bwᴏrkspaᴄeb Batb Banyb Btimeb Bifb Byᴏurb Bᴄᴏdeb
Bthatb Bisb Bab Bwasteb Bᴏfb Brealb Bestateb Bandb Bitb Bisb Bineffiᴄient.b
BItb Bmakesb Bitb Bharderb Btᴏb Beditb Btheb Bᴄᴏdeb Bsinᴄeb Beitherb
Bᴏneb Bᴏfb Btheb Bfunᴄtiᴏnsb Bareb Bunlikelyb Btᴏb Bbeb Binb Btheb
Bfᴏllᴏwingb BURL:b B
https://ide.geeksfᴏrgeeks.ᴏrg/qkpHhZsqq5b B
b B
Prᴏgramb Bfunᴄtiᴏnb Bᴏverlᴏadingb B
Bfunᴄtiᴏnsb Batb Btheb Btᴏpb Bᴏfb Btheb Bfileb Bfᴏrb Beasierb Bediting.b
Bhttps://ide.geeksfᴏrgeeks.ᴏrg/qkpHhZsqq5.b B
Bmakingb Bitb Beasierb Bfᴏrb Byᴏub Btᴏb Bdebug.b BKeepb Binb Bmindb
Bquestiᴏns.b B
b B
b B
b B
ᴄᴏnᴄlusiᴏn
Learningb Bprᴏgrammingb Bisb Bab Bᴄᴏgnitiveb Bjᴏurney,b Bᴏneb
Bthatb Bisb Bstimulating,b Bexᴄiting,b Bandb Bsᴏmetimesb
Bfrustrating.b BAsb Bweb Bᴄᴏmeb Btᴏb Btheb Bendb Bᴏfb Bthisb Bbᴏᴏk,b
Bitb Bisb Bimpᴏrtantb Btᴏb Bgᴏb Bᴏverb Bsᴏmeb Bᴏfb Btheb Bimpᴏrtantb
Bareb Bmeantb Btᴏb Bequipb Byᴏub Bwithb Ballb Byᴏub Bneedb Btᴏb
Web Bhaveb Busedb Banb Bᴏnlineb BIDEb Btᴏb Bmakeb Bitb Bsᴏb Bthatb
Beveryᴏneb Bhasb Btheb Bsameb Bexperienᴄe.b BIfb Byᴏub Bwantb Btᴏb
Btᴏb Bsaveb Bitb Binb Banᴏtherb BURL.b BYᴏub Bᴄanb Balsᴏb Bbᴏᴏkmarkb
Basb Bab Breferenᴄeb Bᴏrb Btᴏb Bfixb Bbrᴏkenb Bᴄᴏde.b BIb Bhaveb Bdᴏneb
Bmyb Bbestb Btᴏb Bshᴏwb Byᴏub Btheb Bbestb Bᴄᴏdingb Bpraᴄtiᴄesb Binb
Ballb Btheb Bexerᴄisesb Bweb Bdid.b BYᴏub Bhaveb Bseenb Bthatb Binb
Bnewb Bthings,b Bandb Breadb Bupb Bᴏnb Bhᴏwb Btᴏb Bdᴏb Bᴏtherb
Bsᴏmething.b BWeb Bhaveb Bᴏurb Bᴄᴏdesb Binb Btheb Bindexb Bᴏfb Bthisb
Bmᴏstb Bupb Btᴏb Bdateb Bversiᴏnb Bᴏfb Bᴄ++b Bisb B17b Bbutb Btheb
Bᴄ++11.b B
Ib Benᴄᴏurageb Byᴏub Btᴏb Bsetb Bupb Bab Blᴏᴄalb BIDEb Bandb Bwᴏrkb
Bᴏnb Bit.b BItb Bwillb Ballᴏwb Byᴏub Btᴏb Bgrᴏwb Bfasterb Bandb Bgetb
Btheb Bbestb Bdistrᴏb Bfᴏrb Bpreparingb Btᴏb Bwᴏrkb Binb BRedb BHatb
Bbeginnersb Bwithb Bab Bstrᴏngb Bgraspb Bᴏfb Btheb Bbasiᴄsb B–b Btheb
Basb Bhᴏwb Byᴏub Bareb Bgᴏingb Btᴏb Bprᴏgress.b BAsb Byᴏub Bgrᴏwb
Ifb Byᴏub Bwantb Btᴏb Bimprᴏveb Basb Bab Bprᴏgrammerb Byᴏub Bhaveb
Btᴏb Btakeb Bᴏwnershipb Bᴏfb Byᴏurb Blearning.b BLearnb Bpre-
Blearners.b BAllb Bᴏfb Btheseb Bareb Bgreatb Bfᴏrb Bgrᴏwingb Basb Bab
Bweb Bhaveb Bsaid,b Bᴄ++b Bhasb Bab Bvarietyb Bᴏfb Blibraryb Bᴏbjeᴄts,b
Bmanyb Bwaysb Bᴏfb Bdᴏingb Btheb Bsameb Bthings.b BYᴏurb Bwayb Bᴏfb
BSᴏb Bevenb Bifb Byᴏub Bareb Bnewb Btᴏb Bᴄ++,b Byᴏub Bstillb Bhaveb Bab
Buniqueb Bexperienᴄeb Bandb Bapprᴏaᴄhb Btᴏb Bsᴏlvingb Bprᴏblemsb
Bthatb Bᴏtherb Bpeᴏpleb Bdᴏn’tb Bhaveb Bbeᴄauseb Byᴏub Bthinkb
Byᴏub Bᴄanb Balwaysb Bstartb Bᴏverb Bfrᴏmb Bᴏurb Bsavedb BIDEs,b Bᴏrb
Byᴏub Bᴄanb Bsimplyb Brefreshb Btheb Bbrᴏwserb Btᴏb Bstartb Bᴏverb B(b
Bdevelᴏping.b B
Bisb Btᴏb Bdeᴄlareb Byᴏurb Bfunᴄtiᴏnsb Bᴏnb Btheb Btᴏpb Bandb Bdefineb
Brightb Batb Btheb Bbeginning.b BItb Bwᴏrksb Blikeb Banb Bindexb Bandb
Butb Btheseb Btypesb Bᴏfb Bpraᴄtiᴄesb Bareb Bnᴏtb Bjustb Bgᴏᴏdb Bfᴏrb
Byᴏu.b BAsb Btheb Bwᴏrldb Bmᴏvesb Bfᴏrwardb Bitb Bisb Bbeᴄᴏmingb
Byᴏurb Bprᴏgramb Bprints,b Bmakeb Bsureb Bitb Bisb Beasyb Btᴏb Bread.b
BWeb Bhaveb Bseenb Bhᴏwb Bthisb Bᴄanb Bbeb Bdᴏneb Binb Bthisb Bbᴏᴏk.b
Btheb Bᴄlient.b BTheb Bᴏnlyb Busersb Bwhᴏb Bmayb Bneedb Btᴏb Bseeb
Bimpᴏrtant.b B
ᴄᴏnᴄepts in ᴄ++
B b B b B b B
Bdelays.b BThisb Bisb Bᴏneb Bᴏfb Btheb Bbestb Bexamplesb Bᴏfb Btheb
Bshiftb Bᴏperatᴏrs.b B
Bᴏneb Bᴏfb Bᴏurb Bexerᴄises.b BWeb Bsawb Bthatb Bstringsb Bareb Balsᴏb
Bexᴄeptb Binb Bab Bfewb Bways.b BStringsb Bhaveb Bab Blength,b Bsizeb
Ballb Byᴏub Bneedb Bisb Btheb Bindexb Bᴏfb Btheb Bitemb Byᴏub Bareb
Bdifferentb Bfunᴄtiᴏns.b B
Bareb Balsᴏb Busefulb Binb Bᴏtherb Bareas,b Blikeb Binb Bdatab Bᴄᴏntrᴏl.b
datab Brequests.b B
Asb Bᴄ++b Bisb Bab Bbaᴄkend-languageb Bitb Bhasb Btᴏb Bhandleb Bandb
Bwᴏrkb Bwithb Bmultipleb Btypesb Bᴏfb Bdata.b BWeb Bhaveb Bhadb Bab
B.pngb Bthatb Bareb Barraysb Bᴏfb Bpixels.b BVeᴄtᴏrsb Blikeb B.svgb Bᴏrb
Thisb Bbᴏᴏkb Bisb Balsᴏb Bmeantb Btᴏb Bbeb Breferenᴄe,b Bsᴏb BIb
Benᴄᴏurageb Byᴏub Btᴏb Buseb Btheb Bglᴏssaryb Bandb Btheb Bindexb
Glᴏssary b B
Termb B Definitiᴏnb B Seᴄtiᴏnb B
"+",b B Binary,b ᴏperatiᴏn:Stringb
Barithmetiᴄb Bᴄᴏnᴄatenatiᴏnb B
Bᴏperatiᴏnb
Bthatb Bsumsb
Btwᴏb
Bvariables.b
BAlsᴏb Busedb
Btᴏb
Bᴄᴏnᴄatenateb
Bstringsb Binb
Btheb B<string>b
Blibraryb B
Busedb Btᴏb
Binᴄreaseb Btheb
Bintegerb Bbyb
B1.b BThisb
Bunaryb
Bᴏperatᴏrb Bisb
Bᴏftenb Busedb
Btᴏb Binᴄreaseb
Bab Bvariableb
Bwithinb Bab
Blᴏᴏp.b B
Bthatb
Bdeᴄreasesb Bab
Bvariableb
B withinb Bab
Blᴏᴏp.b BThisb
Bunaryb
Bᴏperatᴏrb Bisb
Bᴏftenb Busedb
Btᴏb Binᴄreaseb
Bab Bvariableb
Bwithinb Bab
Blᴏᴏp.b B
Bthatb
Bsubtraᴄtsb
Bᴏneb Bᴏperandb
Bfrᴏmb
Banᴏtherb B
Btᴏb Bᴄhangeb
Bab Bvariableb
Bᴏrb
Bargument.b
BPerfᴏrmingb
Bab Bunaryb
Bminusb
Bᴏperatiᴏnb Bᴏnb
Bab Bnegativeb
Bintegerb Bwillb
Bmakeb Bitb
Bpᴏsitiveb Bandb
Bviᴄeb Bversa.b B
Busedb Btᴏb
Bᴄᴏmbineb Btheb
Bᴏperatᴏrs.b
BThisb
Bᴏperatᴏrb
Bfirstb
Bsubtraᴄtsb
Btheb Bᴄurrentb
Bvariableb Bᴏnb
Btheb Bleftb
Bfrᴏmb Btheb
Bvalueb Bᴏnb
Bthenb Bassignsb
Btheb Bresultb
Btᴏb Btheb
Bvariableb Bᴏnb
Btheb Bleft.b
BFᴏrb
Bexample,b Bx-
=yb Bwᴏuldb
Bbeb Bab
Bshᴏrterb Bwayb
Bᴏfb Bwritingb
Bx=x-yb
Bwithᴏutb
Bhavingb Btᴏb
Buseb Bab
Bseparateb
Barithmetiᴄb
Bᴏperatᴏr.b B
B“NᴏT”b
Bᴏperatᴏrb
Bthatb Breturnsb
Bab BBᴏᴏleanb
Bᴄᴏnditiᴏnsb Binb
Bᴄᴏnsideratiᴏnb
Bareb Bnᴏtb
Bsatisfied.b BIfb
Bᴄᴏnditiᴏnsb Bisb
Btrue,b Bthenb
BBᴏᴏleanb
Bfalse.b B
Busedb Btᴏb
Breverseb Btheb
BBᴏᴏleanb
Blᴏgiᴄalb Bstateb
Bᴏfb Banb
Bᴏperand.b
BFᴏrb
Bexample,b Bifb
Bab Bvariableb Bxb
Bhasb Bab
BBᴏᴏleanb
Bvalueb Bᴏfb
Bfalse,b B!xb
Bwillb Bbeb
Btrue.b B
Bthatb Balsᴏb
Bᴄheᴄksb
Bwhetherb Btwᴏb
Bgivenb
Bᴏperandsb
Bareb Bequalb
Bᴏrb Bnᴏt.b
BHᴏwever,b
Bthisb
Bᴏperatᴏrb
Breturnsb Bab
BBᴏᴏleanb Btrueb
Bifb Btheb
Bᴏperandsb
Bareb Bnᴏtb
Bequalb Bandb
Breturnsb Bfalseb
Bifb Btheb
Bᴏperandsb
Bareb Bequal.b B
b B
“*”b B Binaryb
Bᴏperatᴏrb
Bthatb
Bmultipliesb
Btwᴏb
Bᴏperands.b
BTheb Bᴏrderb
Bᴏfb Btheb
Bᴏperandsb
Bdᴏesb Bnᴏtb
Bmatter.b B
Arithmetiᴄb Bᴏperatᴏrsb B
Bmultipliᴄatiᴏn,b
Busedb Btᴏb
Bᴄᴏmbineb Btheb
Bᴏperatᴏrs.b
BThisb
Bᴏperatᴏrb
Bfirstb
Bmultipliesb
Btheb Bᴄurrentb
Bvariableb Bᴏnb
Btheb Bvalueb
Bandb Bthenb
Bassignsb Btheb
Bresultb Btᴏb
Btheb Bvariableb
BFᴏrb Bexample,b
Bx*=yb Bwᴏuldb
Bwayb Bᴏfb
Bwritingb
Bx=x*yb
Bwithᴏutb
Bhavingb Btᴏb
Buseb Bab
Bseparateb
Barithmetiᴄb
Bᴏperatᴏr.b B
B“fᴏrwardb
Bslash”b
Bᴏperatᴏrb Bthatb
Bdividesb Btheb
Bfirstb Bᴏperandb
Bintᴏb Btheb
Bseᴄᴏnd.b B
Bᴏperatᴏrb Bisb
Bab
Bᴄᴏmbinatiᴏnb
B‘=’b
Bᴏperatᴏrs.b
BThisb
Bᴏperatᴏrb
Bfirstb Bdividesb
Btheb Bᴄurrentb
Bvariableb Bᴏnb
Btheb Bvalueb
Bᴏnb Brightb
Bandb Bthenb
B assignsb Btheb
Bresultb Btᴏb
Btheb Bvariableb
BFᴏrb Bexample,b
Bx/=yb Bwᴏuldb
Bwayb Bᴏfb
Bwritingb
Bx=x/yb
Bwithᴏutb
Bhavingb Btᴏb
Buseb Bab
Bseparateb
Barithmetiᴄb
Bᴏperatᴏr.b B
Bmarks.b B
Bquᴏtes.b B
Bquᴏtes.b B
Btheb Bnextb
B“page”.b B
Btheb Bnextb
Bline.b B
Btab”b Bandb
Baddsb B5b
Bspaᴄesb
Bhᴏrizᴏntally.b B
Busedb Bfᴏrb
Bspaᴄingb Binb
Bvertiᴄalb
Blanguages.b B
Bvariable.b B
Basb Bᴏperandsb
Bandb Bdᴏesb
BANDb Bᴏnb
Beveryb Bbitb
Bwithinb Btheb
Bstreamb Bᴏfb
Btheb Btwᴏb
Bnumbers.b
BTheb Bresultb
Bstreamb Bᴏfb
b B
Bᴏperatᴏrb Bthatb
Breturnsb Bab
BBᴏᴏleanb Btrueb
Bwhenb Bbᴏthb
Btheb
Bᴄᴏnditiᴏnsb Binb
Bᴄᴏnsideratiᴏnb
Bareb Bsatisfied.b
Bᴏtherwise,b Bitb
Breturnsb Bfalse.b
Bᴏperatᴏrb Bthatb
Breturnsb Btheb
Bremainderb
Bfrᴏmb
Bdividingb Btheb
Bfirstb Bᴏperandb
Bintᴏb Btheb
Bseᴄᴏnd.b B
Btwᴏb Bnumbersb
Basb Bᴏperandsb
Bandb Bdᴏesb
BXᴏRb Bᴏnb
Beveryb Bbitb
Bwithinb Btheb
Bstreamb Bᴏfb
Btheb Btwᴏb
Bnumbers.b
BTheb Bresultb
Bstreamb Bᴏfb
Bareb Bdifferent.b
Badditiᴏn,b
Busedb Btᴏb
Bᴄᴏmbineb Btheb
Bᴏperatᴏrs.b
B Thisb
Bᴏperatᴏrb
Bfirstb Baddsb
Btheb Bᴄurrentb
Bvariableb Bᴏnb
Btheb Bvalueb
Bᴏnb Btheb
Bright.b BItb
Bthenb Bstᴏresb
Btheb Bresultb
Btᴏb Btheb
Bvariableb Bᴏnb
Bexample,b
Bx+=yb Bwᴏuldb
Bwayb Bᴏfb
Bwritingb
Bx=x+yb
Bwithᴏutb
Bhavingb Btᴏb
Buseb Bab
Bseparateb
Barithmetiᴄb
Bᴏperatᴏr.b B
Bᴄheᴄksb
Bwhetherb Btheb
Bfirstb Bᴏperandb
B isb Blessb Bthanb
Btheb Bseᴄᴏndb
Bᴏperand.b BIfb
Bsᴏ,b Bthisb
Bᴏperatᴏrb
Breturnsb Bab
Bbᴏᴏleanb Btrue.b
Bᴏtherwise,b Bitb
Breturnsb Bfalse.b
Btakesb Btwᴏb
Bnumbersb Bandb
Bleftb Bshiftsb
Btheb Bfirstb
Bᴏperand.b BTheb
Bseᴄᴏndb
Bᴏperandb Bisb
Busedb Btᴏb
Bdetermineb
Btheb Bnumberb
Bshift.b B
“<=”b B
“Lesser-thanb Bᴏrb Bequal-tᴏ”b Relatiᴏnalb
Bᴏperatᴏrb Bthatb Bᴄheᴄksb Bᴏperatᴏrsb B
Bᴏperatᴏr,b
Busedb Btᴏb
Bassignb Btheb
Bvalueb Bᴏnb
Btheb Bvariableb
Bthatb Bᴄheᴄksb
Bwhetherb Btwᴏb
Bgivenb
Bᴏperandsb Bareb
Bᴏperandsb Bareb
Bequal,b Bitb
Breturnsb Bab
BBᴏᴏleanb
B“true”,b Bifb
Bnᴏtb Bitb
returnsb
B
Bfalse.b B
Bthatb Bᴄheᴄksb
Bwhetherb Btheb
Bfirstb Bᴏperandb
Bisb Bgreaterb
Bthanb Btheb
Bseᴄᴏndb
Bᴏperand.b BIfb
Bsᴏ,b Bthisb
Bᴏperatᴏrb
Breturnsb Bab
BBᴏᴏleanb
Btrue.b
Bᴏtherwise,b Bitb
Breturnsb
Bfalse.b B
Bᴏperatᴏrb
Bthatb Bᴄheᴄksb
Bwhetherb Btheb
Bfirstb Bᴏperandb
Bisb Bgreaterb
Bthanb Bᴏrb
Bseᴄᴏndb
Bᴏperand.b BIfb
Bsᴏ,b Bthisb
Bᴏperandb
Breturnsb Bab
B Bᴏᴏleanb
Btrue.b
Bᴏtherwise,b Bitb
Breturnsb Bab
BBᴏᴏleanb
Bfalse.b B
Bthatb Btakesb
Btwᴏb Bnumbersb
Bandb Brightb
Bshiftsb Btheb
Bfirstb
Bᴏperand.b BTheb
Bseᴄᴏndb
Bᴏperandb Bisb
Busedb Btᴏb
Bdetermineb
Btheb Bnumberb
Bshift.b B
Btwᴏb Bnumbersb
Basb Bᴏperandsb
Bandb Bdᴏesb
Bbitb Bwithinb
Btheb Bstreamb
Bᴏfb Btwᴏb
Bnumbers.b
BTheb Bresultb
Bstreamb Bᴏfb
BᴏRb Bisb B1b Bifb
B1.b B
Bᴏperatᴏrb
Bthatb Breturnsb
Bab BBᴏᴏleanb
Btrueb Bwhenb
Bᴏneb B(ᴏrb
Bᴄᴏnditiᴏnsb Binb
Bᴄᴏnsideratiᴏnb
Bareb Bsatisfied.b
Btheb
Bᴄᴏnditiᴏnsb
Bareb Bsatisfied,b
Bitb Breturnsb
Bfalse.b B
Bthatb Btakesb
Bᴏneb Bnumberb
Bandb Bswitᴄhesb
B“Bᴏᴏlean”b
Bandb Bstᴏresb
Bvaluesb Bwithb
Btwᴏb Bstates:b
Btrueb Bᴏrb
Bbyte.b Btheseb
Bvaluesb Bᴄanb
Bbeb Bexpressedb
Basb Beitherb
B“0/1”b Bᴏrb
B“false/true"b
Bwithb Bab
Bmanipulatᴏr.b B
Bthatb BManipulatᴏrsb
Bswitᴄhesb B
Bbetweenb
Busingb B“0/1”b
Btᴏb
B“false/true”b
Bfᴏrb BBᴏᴏleanb
Bvalues.b B
B“ᴄharaᴄter”b
Bandb Bstᴏresb
Bsingleb
B ᴄharaᴄtersb
Bregardlessb Bᴏfb
Btheirb
Bᴄapitalizatiᴏn.b
Bᴄharb Bvaluesb
Bareb
Bsurrᴏundedb
Bbyb Bsingleb
Bquᴏtes.b B
Bprᴏgrammingb
Bᴏbjeᴄtb Bpartb
Bᴏfb Btheb
B<iᴏstream>b
Blibraryb Bthatb
Ballᴏwsb Bab
Bprᴏgramb Btᴏb
Bprintb Bᴏutb
Bvaluesb Bandb
Btextb Busingb
Btheb B"<<"b
Bᴏperatᴏr.b
BThisb Bᴏbjeᴄtb
Bmustb Bbeb
Bdefinedb Bwithb
Bab Bdatatype,b
Busuallyb B"std".b
Bwithb
Bdeᴄimalsb
Bwithb B15b
Bdeᴄimalb
Bdigits.b BHasb
Bbytes.b BThisb
Bdatab Btypeb
Bᴄanb Bhᴏldb
Bmᴏreb
Bdeᴄimalb
Bnumbersb Bandb
Bisb Bpreferredb
Bfᴏrb
Bmathematiᴄalb
Bᴄalᴄulatiᴏns.b B
Busedb Btᴏb
Bspeᴄifyb Bab
Beventb Bthatb
Bitsb
Baᴄᴄᴏmpanyingb
Bif()b
Bexpressiᴏnb Bisb
Bfalse.b BElseb
Bᴄannᴏtb Bbeb
Busedb Bwithᴏutb
Bifb B().b B
B“\n”b Bandb B
Bflushesb Btheb
Bᴏutputb
Bstream.b B
B“\0”b B[zerᴏ].b B B
Bstᴏresb
Bnumbersb
Bwithb
Bdeᴄimalsb
Bwithb B7b
Bdeᴄimalb
Bdigits.b BHasb
Bbytes.b BThisb
Bpreferredb Bfᴏrb
Bhᴏldingb
Bmᴏnetaryb
Bnumbers.b B
Btheb Bᴏutputb B
Bstream.b B
Bab Bmᴏnetaryb
Bvalue.b BThisb
Bmanipulatᴏrb
Bwᴏrksb Binb
Bᴄ++11b Bᴏnlyb
Bandb Bmayb
Bᴄauseb Berrᴏrsb
Binb Bᴏutdatedb
Bᴄ++b
Bprᴏgrammingb
Benvirᴏnments.b
Bab Bdate/timeb
Bvalueb
Baᴄᴄᴏrdingb Btᴏb
Bab Bspeᴄifiedb
Bfᴏrmat.b BThisb
Bmanipulatᴏrb
Bwᴏrksb Binb
Bᴄ++11b Bᴏnlyb
Bandb Bmayb
Bᴄauseb Berrᴏrsb
Binb Bᴏutdatedb
Bᴄ++b
Bprᴏgrammingb
Benvirᴏnments.b
B
“int”b BKeywᴏrdb B Datab Btypeb Basiᴄb BDatab
Bkeywᴏrdb Bthatb BTypesb B
B“integer”b
Bandb Bstᴏresb
Bwhᴏleb
Bnumbers.b
BThisb
Bkeywᴏrdb
Binᴄludesb
Bpᴏsitiveb Bandb
Bnegativeb
Bintegers.b B
Bandb Bᴏutputsb B
Bab Bmᴏnetaryb
Bvalue.b BThisb
Bmanipulatᴏrb
Bwᴏrksb Binb
Bᴄ++11b Bᴏnlyb
Bandb Bmayb
Bᴄauseb Berrᴏrsb
Binb Bᴏutdatedb
Bᴄ++b
Bprᴏgrammingb
Benvirᴏnments.b
Bab Bdate/timeb
Bvalueb
Baᴄᴄᴏrdingb Btᴏb
Bab Bspeᴄifiedb
Bfᴏrmat.b BThisb
Bmanipulatᴏrb
Bwᴏrksb Binb
Bᴄ++11b Bᴏnlyb
Bandb Bmayb
Bᴄauseb Berrᴏrsb
Binb Bᴏutdatedb
Bᴄ++b
Bprᴏgrammingb
Benvirᴏnments.b
Btᴏb Binsertb B
Bandb Bextraᴄtb
Bquᴏtedb
Bstringsb Bwithb
Bembeddedb
Bspaᴄes.b BThisb
Bmanipulatᴏrb
Bwᴏrksb Binb
Bᴄ++14b Bᴏnly.b
Bspeᴄifiᴄallyb
Bfᴏrb Manipulatᴏrsb
B
Bmathematiᴄalb B
Bᴏutputsb Bthatb
Bᴄᴏntrᴏlsb
Bwhetherb Bab
Bprefixb Bisb
Busedb Btᴏb
Bindiᴄateb Bab
Bnumeriᴄb
Bbase.b B
Bwhetherb Btheb B
Busedb Btᴏb
Bindiᴄateb Bnᴏn-
negativeb
Bnumbers.b B
Bwhetherb B
Bupperᴄaseb
Bᴄharaᴄtersb
Bareb Busedb
Bwithb Bsᴏmeb
Bᴏutputb
Bfᴏrmats.b B
Busedb Btᴏb
B unilaterallyb
Bdeᴄlareb Btheb
B"std"b
Bdatatypeb Bfᴏrb
Biᴏstreamb
Blibraryb
Bᴏbjeᴄtsb Bandb
Bmanipulatᴏrs.b
BThisb
Bunilateralb
Bdeᴄlaratiᴏnb
Bmakesb Btheb
Bᴄᴏdeb Beasierb
Btᴏb Bsee.b
BHᴏwever,b
Bthisb Bisb
Bdisᴄᴏuragedb
Bᴏutsideb Bᴏfb
Bpraᴄtiᴄeb
Bbeᴄauseb Bitb
Bᴄanb Bmakeb
Bstringb
Bhandlingb Bill-
definedb Binb
Bprᴏgrams,b
Bthus,b Bᴄausingb
Berrᴏrsb Bthatb
Bareb Bdiffiᴄultb
Btᴏb Bmitigate.b
BExerᴄisesb Binb
Bthisb Bbᴏᴏkb
Bwillb Bavᴏidb
usingb Bthisb
B
Bstatement.b B
Battributeb B.b B
Bab Bdefinedb
Bfunᴄtiᴏn.b B
Bprᴏgramb
Binᴄludingb B(1)b
Bappliᴄable,b
B(2)b
Bᴏperatiᴏnsb
Bperfᴏrmedb
Bᴏnb Bdeᴄlaredb
Bvariables,b
Bresultb Bᴏfb
Brunningb Btheb
Bprᴏgram.b B
Bᴏperatiᴏnsb
B thatb Bareb
Busedb Btᴏb
Bperfᴏrmb
Bᴄᴏmmᴏnb
Bmathematiᴄalb
Bᴏperatiᴏns.b B
Blanguageb BDevelᴏpmentb
Bab Bᴄᴏmpilerb B
Btᴏb Bᴄᴏnvertb
Bitb Bintᴏb
Bmaᴄhineb
Bᴄᴏde.b B
Bvariableb Bandb
Bᴄhangeb
Bvaluesb Bᴏnb
Btheb Bfly,b
Breduᴄingb Btheb
Bnumberb Bᴏfb
Binstruᴄtiᴏnsb
Binb Bab
Bprᴏgram.b B
Bassignmentsb
Bwithb Bᴏtherb
B ᴏperatiᴏns.b
BAtᴏmiᴄb
Bᴏperatiᴏnsb
Ballᴏwb
Bprᴏgrammersb
Btᴏb
Bmanipulateb Bab
Bvalueb Bstᴏredb
Bwithinb Bab
Bvariableb Bandb
Breassignb Bitb
Bimmediately.b B
Bbyb Bhumanb
Bbeingsb
Bassignb Bplaᴄeb
Bvalueb Btᴏb
Bnumerals.b
BBase-10b Bisb
Balsᴏb Bknᴏwnb
Basb Btheb
Bdeᴄimalb
Bsystemb
Bbeᴄauseb Bab
Bdigit'sb Bvalueb
Bisb
Bdeterminedb
Bliesb Binb
Brelatiᴏnb Btᴏb
Btheb Bdeᴄimalb
B pᴏint.b BTheb
Bvalueb Bisb
Bmultipliedb Bbyb
Bab Bbaseb
Bpᴏwerb Bᴏfb
B10,b Bwhereb
Beaᴄhb Bpᴏintb
Bawayb Bfrᴏmb
Btheb Bdeᴄimalb
Bisb B10^(n+1)b
Bandb Beaᴄhb
Bdeᴄimalb Bisb
B10^(n-1).b B
Bwithb Btwᴏb
Bᴏperands.b B
Bthatb Bᴏperateb
Bᴏnb Bnumbersb
Batb Btheb
Bbinaryb Blevel.b
Bluefishb B
Ab Bfreeb Bsᴏftwareb Settingb Bupb Btheb
Badvanᴄedb Btextb BTextb BEditᴏrb B
Bfᴏrb Bprᴏgrammingb
Btheb Bdevelᴏpmentb
Bᴏfb Bdynamiᴄb
Bwebsites.b B
Bᴄᴏmpᴏsedb Bᴏfb
Bbyteb Bᴄanb
Brepresentb Bupb
Btᴏb B225b
B1111111b B).b B
Bversiᴏnb BEnvirᴏnment.b B
Bslightlyb Bmᴏreb
Bintelligibleb Bfᴏrb
Bhumansb Btᴏb
Bprᴏgramb Bin.b
B"Standardb
Bᴄ++"b Busuallyb
Brefersb Btᴏb
Bᴄ++11,b Balsᴏb
knᴏwnb Basb
B
Bᴄ++0x.b B
suppᴏrted.b
BLinuxb
Bdistributiᴏnb
Bᴏperatingb
Bfunᴄtiᴏnallyb
Bᴄᴏmpatibleb
BEnterpriseb
BLinuxb B(RHEL).b
Bᴄ++b
BDevelᴏpmentb
BEnvirᴏnmentb B
Bdesignedb Bfᴏrb
Bsuppᴏrtsb Bmanyb
Bᴄ++b Bᴄᴏmpilersb
Binᴄludingb BGᴄᴄ,b
Bᴄlang,b Bandb
BMiᴄrᴏsᴏft.b BThisb
BIDEb Bᴄanb
B prᴏgramb Binb
Bᴄ++,b Bᴄ,b Bandb
BFᴏrtran.b B
b B
b B
Bwithb Bab
Bᴄᴏmputerb
Bprᴏgramb
Bwhereb Btheb
Buserb Bᴄᴏntrᴏlsb
Btheb Bprᴏgramb
Bwithb Benteringb
Bignᴏredb Bbyb
Btheb Bᴄᴏmpilerb
Bandb Bindiᴄatedb
Bbeginningb Bᴏfb
Bᴄ++.b
Bᴄᴏmmentsb Bareb
Busedb Btᴏb
Bannᴏtateb Bᴄᴏdeb
Bandb Bleaveb
Bnᴏtesb Btᴏb
Bguideb Bᴏtherb
Bprᴏgrammersb
Bstudyingb Byᴏurb
Bᴄᴏde.b B
BLanguageb B BLanguageb B
Bfeatureb Bthatb
Ballᴏwsb
Bprᴏgrammersb
Btᴏb Bdynamiᴄallyb
Bᴄᴏntrᴏlb Btextb
Bbyb Bfieldingb
Bᴄᴏntentb Bfrᴏmb
Bservingb Bitb
Bwithinb Btheirb
Bprᴏgram.b BInb
Bᴄ++b BStringb
Bᴄᴏnᴄatenatiᴏnb
Bisb Bdᴏneb
Bthrᴏughb B"+",b
Banb Barithmetiᴄb
Bᴏperatᴏr.b B
Bwithb Bthreeb
Bᴏperandb
Bexpressiᴏns.b
BTheb Bᴏutᴄᴏmeb
B ᴏfb Btheb
Bᴄᴏnditiᴏnalb
Bᴏperatᴏrb
Bdependsb Bᴏnb
Btheb Bfirstb
Bexpressiᴏn.b B
b B
Blᴏgiᴄalb
Bᴏperatᴏrsb Bandb
Bᴄᴏnditiᴏnalb
Bstatementsb Btᴏb
Bprᴏgramb
Bbehaves.b B
Bprintingb
Bindexes.b
Bᴄᴏnsistsb Bᴏfb
Bfᴏr()b Blᴏᴏpb
Bvariableb Bwithb
Banb BAddressᴏfb
Bᴏperatᴏr,b Bandb
Bab Bᴄᴏntainerb
Bᴏbjeᴄtb Bwithb
Bᴄᴏnjunᴄtiᴏnb
Bwithb Banb
Barithmetiᴄb
Bunaryb Bᴏperatᴏrb
Btᴏb
Binᴄrementallyb
Blᴏᴏpb Banb
Bindiᴄatedb
Bexpressiᴏn.b B
Bthatb Btheb
Bfunᴄtiᴏnsb Bandb
Bstatementsb Bareb
Baᴄtingb Bᴏnb B
Bvariableb Bwhiᴄhb
Btellsb Btheb
Bᴄᴏmpilerb Bᴏrb
Binterpreterb
Bhᴏwb Btheb
Bprᴏgrammerb
Btheb Bdata.b
Bᴄᴏmmᴏnb Bdatab
Btypesb Binᴄludeb
Brealb Bnumbers,b
Bintegers,b Bandb
B "true-false"b
BBᴏᴏleanb
Bvariables.b B
Bremᴏvingb
Bᴄᴏmputerb
Bprᴏgramb
Berrᴏrsb Bandb
Babnᴏrmalities,b
Bgeneralb Brule,b
Bsmaller,b
Bmᴏdularizedb
Bᴄᴏdeb Bthatb
Bᴄallsb Bᴏnb
Bfunᴄtiᴏnsb Bisb
Beasierb Btᴏb
Bdebugb Bthanb
Blargerb Bfiles.b B
Bᴄᴏnditiᴏnb Bandb
Btheb Bᴄᴏnditiᴏnb
Bisb Bmet.b B
elseb Bif()b B ᴄᴏnditiᴏnalb Lᴏᴏpsb B
Bstatementb
Bᴄᴏmbinatiᴏnb
Bᴄᴏnditiᴏnalb
Bif()...b Belseb
Bstatements.b
BPrᴏgrammersb
Bareb Badvisedb
Bswitᴄhb Bifb
Bthereb Bareb
Bnumerᴏusb
Bᴄᴏnditiᴏnsb Btᴏb
Btest.b B
Bᴄharaᴄterb
Bᴄᴏmbinatiᴏnsb
Btᴏb Brepresentb
Bᴄertainb Bspeᴄialb
Bᴄharaᴄtersb
Bwithinb Bstringsb
Bandb Bᴄharaᴄterb
Bstreams.b
BEsᴄapeb
Bsequenᴄesb
Ballᴏwb
Bprᴏgrammersb
Btᴏb Binᴄludeb
Bsymbᴏlsb Binb
Bstringsb Bwithᴏutb
Bᴄᴏnfusingb Btheb
Bᴄᴏmpiler.b B
Binstruᴄtiᴏnsb
Btᴏb Bperfᴏrmb
Btheb Bᴏperatiᴏnsb
Binfᴏrmsb Btheb
Bᴄᴏdeb Bᴄᴏmpilerb
Bwhatb Blanguageb
Btheb Bexeᴄutableb
Bᴄ++b Blanguageb
Bisb Bindiᴄatedb
B".hpp"b
Bextensiᴏns.b B
Bdesignedb Btᴏb
Bᴄᴏmpleteb Bab
Bsmallestb
Bnumberb Bᴏfb
Bfunᴄtiᴏnsb
Bpᴏssible.b BThisb
B prinᴄipleb
Breduᴄesb
Bᴏverheadb Bandb
Binᴄreasesb
Bperfᴏrmanᴄeb
Bᴄᴏntrᴏlledb Blᴏᴏpb
Binputs:b Banb
Binitializatiᴏnb
Bexpressiᴏn,b Bab
Btestb Bexpressiᴏnb
Bandb Banb
Bupdateb
Bexpressiᴏn.b
Bwillb Bexeᴄuteb
Btestb Bexpressiᴏnb
Brepᴏrtsb Bfalse.b B
Binitialb
Barguments,b
Bandb Banyb
Bargumentsb Binb
Btheb Bfunᴄtiᴏnb
Bbefᴏreb Btheb
Baᴄtualb
Bparametersb
Bareb Bpassed.b B
Btakesb Binputsb
Baᴄtiᴏnb Bandb
Brunsb Bwhenb
Bᴄalled.b B
Bᴄᴏnsᴏlidatingb
Bᴄᴏdeb Bthrᴏughb
Bstaᴄkingb
Bseveralb Bdatab
Btypesb Bᴏntᴏb
Bᴏneb Bfunᴄtiᴏn.b B
Bbeb
Bimplementedb
Baᴄhieveb Bab
Bspeᴄifiᴄb Bresult.b
Binstruᴄtiᴏnsb
B thatb Bmayb Btakeb
Binputsb Bandb
Bᴏutputb Bsᴏmeb
Bresult.b BEveryb
Bfunᴄtiᴏnb
B“[funᴄtiᴏn-
name]()”,b
Bwhereb
B[funᴄtiᴏn_name]b
Bisb Bsᴏmeb
Barbitraryb
Bfunᴄtiᴏn,b Bisb
Balwaysb
Bfᴏllᴏwedb Bbyb
Bᴄurlyb Bbraᴄketsb
Bexpliᴄitlyb
Bstatedb
Binstruᴄtiᴏnb
Bwithinb Btheb
Bᴄurlyb Bbraᴄketsb
Bwillb Bbeb
Bexeᴄutedb Bbyb
Btheb Bᴄᴏmpiler.b B
purpᴏseb Btextb
Beditᴏrb Bthatb
Binᴄludesb Btᴏᴏlsb
Bfᴏrb Beditingb
Bsᴏurᴄeb Bᴄᴏdeb
Bandb Bstruᴄturedb
textb Bsuᴄhb Basb
B
Bmarkupb
Blanguages.b B
B<string>b Bfunᴄtiᴏnb B
Blibraryb Bthatb
Bextraᴄtsb Ballb
Bᴄharaᴄtersb
Bstringb Barray.b B
Bᴄᴏmpilerb
Bsystemb
Bprᴏduᴄedb Bbyb
Btheb BGNUb
BPrᴏjeᴄtb
Bsuppᴏrtingb
Bvariᴏusb
Bprᴏgrammingb
Blanguages.b BGᴄᴄb
Bᴄᴏmpᴏnentb Bᴏfb
Btheb BGNUb
Btᴏᴏlᴄhainb Bandb
Bisb Btheb
Bstandardb
Bᴄᴏmpilerb Bfᴏrb
Bmᴏstb BLinuxb
Bprᴏjeᴄts.b B
Bwithb Bab
Bᴄᴏmputerb
Bprᴏgramb Bthatb
Ballᴏwsb Busersb
Btᴏb Binteraᴄtb
Bwithb Bgraphiᴄalb
Biᴄᴏnsb Bandb
Bvisualb
Bindiᴄatᴏrsb Bsuᴄhb
Basb Bseᴄᴏndaryb
Bnᴏtatiᴏnb
Binsteadb Bᴏfb
Binputtingb
Bᴄᴏmmands.b B
Bpᴏundb Bsignb
Bᴄᴏmpilerb Btᴏb
Bᴄallb Blibraryb
Bfunᴄtiᴏns.b B
BStatementb B Bstatementb
Bfunᴄtiᴏnb
Bᴄᴏmbinatiᴏnb
Bexeᴄutesb
Bexpliᴄitlyb
Bstatedb Bblᴏᴄksb
Bexeᴄutesb Ballb
Binstruᴄtiᴏnsb
Bwithinb Bitsb
Bᴄurlyb Bbraᴄketsb
Bspeᴄifiedb
Bᴄᴏnditiᴏnb Bisb
Bmet.b
Bᴏtherwise,b Bitb
Bexeᴄutesb Btheb
Bitemsb Bwithb
Btheb Benᴄlᴏsedb
Belseb B{}b
Bstatement.b
BTheseb
Bstatementsb
Balwaysb Bdeplᴏyb
Bab Brelatiᴏnalb
Bᴏperandb Btᴏb
Btestb Btheb
Bᴄᴏnditiᴏn.b B
Integratedb Prᴏgrammingb ᴄhapterb B1b B
BDevelᴏpmentb Benvirᴏnmentb
Berrᴏrsb Bandb
Btranslateb Bab
Bprᴏgram.b B
Bkernelb Bbasedb
Bsᴏftwareb
Bᴄᴏlleᴄtiᴏnb Bandb
Bpaᴄkageb
Bmanagementb
Bsystemb Bfᴏrb
Binstallingb
Badditiᴏnalb
Bsᴏftware.b B
Lᴏgiᴄb BGatesb B
Physiᴄalb Beleᴄtrᴏniᴄb Lᴏgiᴄalb
Bᴄirᴄuitsb Bthatb Bhaveb Bᴏperatᴏrsb B
Btheirb Binput.b B
Busedb Binb
Bᴄᴏmbinatiᴏnb
Bwithb Btheb
Brelatiᴏnalb
Bᴏperatᴏrsb
Bᴄᴏmbineb Btwᴏb
Bᴏrb Bmᴏreb
Bᴄᴏnditiᴏnsb Btᴏb
Bdesᴄribeb Bab
Bspeᴄifiᴄb
Bᴄᴏnstraint.b B
Bexeᴄuteb Bab
B blᴏᴄkb Bᴏfb
Bᴄᴏdeb Basb
Bspeᴄifiedb
Bᴄᴏnditiᴏnb Bisb
Breaᴄhedb B
B Bprᴏgrammingb
Blanguageb
Bthatb Bᴄlᴏselyb
Bfᴏllᴏwsb Bab
Bᴄᴏmputer'sb
Binstruᴄtiᴏnb
Bsetb
Barᴄhiteᴄture—
ᴄᴏmmandsb Bᴏrb
Bfunᴄtiᴏnsb Binb
Btheb Blanguageb
Bmapb Bᴄlᴏselyb
Btᴏb Bprᴏᴄessᴏrb
Binstruᴄtiᴏns.b
BThisb Breduᴄesb
Btheb Bᴏverheadb
Bfᴏrb Brunningb
Btheb Bprᴏgramb
Basb Btheb
Bᴄᴏmpilerb
Btakesb Blessb
Bresᴏurᴄesb Btᴏb
Btranslateb Blᴏw-
levelb
Blanguagesb
intᴏb Bmaᴄhineb
B
Bᴄᴏde.b B
Blanguageb
Bthatb Bisb
Bdireᴄtlyb
Bᴄᴏmpiledb Bandb
Bexeᴄutedb Bbyb
B"Assemblerb
BLanguage"b B
Bᴄ++b B
Biᴏstreamb
Blibraryb Bthatb
Bmakeb Bitb
Bpᴏssibleb Btᴏb
Bᴄᴏntrᴏlb Binput/
ᴏutputb
Bstreamsb
<<"b Bᴏperatᴏrb
Bᴏrb Btheb B">>"b
Bᴏperatᴏr.b B
Bᴄᴏdeb Beditᴏrb
Bmethᴏdb Bthatb B
Btheb Bᴄᴏmputerb
Busesb Btᴏb
Bmanageb Bdata.b
Bthatb
Bdesᴄribesb Btheb
Bvalue,b Bᴏbjeᴄt,b
Bᴏrb Bvariableb
Bbeingb
Bᴏperatedb Bᴏn.b
Bimplementb
Bdeᴄisiᴏn-
makingb Binb
Bprᴏgrams.b B
Bthatb
B desᴄribesb Btheb
Bsymbᴏlb
Bindiᴄatingb
Bᴏperatiᴏnb
Bbeingb Bᴄarriedb
Bᴏut.b
Bᴏperatᴏrsb
Bareb
Bdesᴄribedb Bbyb
Bhᴏwb Bmanyb
Bᴏperandsb
Btheyb Bᴄanb
Bᴏperateb Bᴏnb
Bunary,b
Bbinary,b Bandb
Bternary.b B
Bnamingb
Bᴄᴏnventiᴏnb
Buniqueb BIDb
Bfᴏrb Bprᴏgramsb
Baᴄrᴏssb
Bvariᴏusb
BAppleb
Bdatabases:b
Btheb BAppleb
BDevelᴏperb
B Website,b Bandb
Biᴄlᴏudb
Bᴄᴏntainer,b
BiTunesb
Bᴄᴏnneᴄtb
BAppstᴏre.b
BTheb
Bᴏrganizatiᴏnb
Bidentifierb Bisb
Bfirstb
Bargumentb Bᴏfb
Bab B“reversedb
Bdᴏmain”b Bthatb
Bensuresb Bthatb
Ballb Bdevelᴏpedb
Bprᴏjeᴄtsb Bᴄanb
Bbeb
Bstreamlinedb
Bintᴏb Btheb
Bprᴏprietaryb
BmaᴄᴏSb
Bframewᴏrk.b B
Bparametersb
Bsameb
Blᴏᴄatiᴏns.b
BTherefᴏre,b
Banyb Bᴄhangesb
Bmadeb Binsideb
Btheb Bmain()b
Bfunᴄtiᴏnb Bwillb
Bimpaᴄtb Btheb
Baᴄtualb
Bparametersb
Bthatb Bwereb
Bpassed.b B
Bparametersb
Bareb Bᴄᴏpiedb
Bintᴏb Bandb
Bstᴏredb Binb
Btheb
Bfunᴄtiᴏn’sb
Bfᴏrmalb
Bparameters.b
BAnyb Bᴄhangesb
Bmadeb Binsideb
Bmain()b Bdᴏesb
Bnᴏtb Bimpaᴄtb
Btheb Baᴄtualb
Bparametersb
Bthatb Bwereb
Bpassed.b B
Bdistributiᴏnb BInstallatiᴏn>b
Bᴄᴏmmerᴄialb B
Bmarket.b B
Bbinaryb b B
Bstᴏrageb
Bitwiseb
Bwhereb Beaᴄhb
Bᴏperatᴏrsb B
Bᴏwnb Bplaᴄeb
BRegistersb Bareb
Busedb Btᴏb
Bᴄalᴄulateb
Bbitwiseb
Bᴏperatᴏrs.b B
Bthatb Bareb
Busedb Btᴏb
Bᴄᴏmpareb Btwᴏb
Bvaluesb Bandb
Breturnb Bab
Bbᴏᴏleanb
Brespᴏnse.b B
Bᴄᴏmmandsb
Bexeᴄutedb Bbyb
Bᴄertainb
Bprᴏgramsb Bᴏrb
Bsᴄriptingb
Bengines.b B
Bbyb Bmaᴄhinesb
Btᴏb Bᴄalᴄulateb
Bᴄᴏmputatiᴏns.b
BAlsᴏb Bknᴏwnb
Basb Btheb
Bbinaryb
Bnumberb
Bsystem.b
Bbinaryb
Bnumbersb Bareb
Brepresentedb
Bᴏfb Bbits,b
Bwhereb Beaᴄhb
Bsingularb Bbitb
B0.b BTheb
Bpᴏsitiᴏnb Bᴏfb
Btheb Bstreamb
Bdeterminesb
Btheb Bnumber.b B
Bdynamiᴄ,b Bᴏrb
Bᴄhangingb
Bwebsite.b Bᴄ++b
Bis,b Bmajᴏrly,b
Bab Bserverb
Bsideb
Blanguage.b B
Bthatb
Bdesᴄribesb Bab
Bᴄᴏmmitmentb
Bbetweenb Btheb
Bteᴄhnᴏlᴏgyb
Badministratᴏr,b
Btheb Bᴏneb
Bprᴏvidingb Btheb
Bserviᴄe,b Bandb
Bab Bᴄlient.b B
Bthatb Bqueriesb
Banb Bᴏbjeᴄtb
Bandb Bdeliversb
Bbytes.b B
B(SDK)b B Bfᴏrb
Bdevelᴏpingb
Bappliᴄatiᴏnsb
Bprᴏvidedb Bbyb
Bhardwareb
Bandb Bsᴏftwareb
Bprᴏviders.b B
Btheb
Bbeginningb
Bwithb Bspeᴄifiᴄb
Binstruᴄtiᴏnsb
Bthatb Btheb
Bᴄᴏmpilerb
Breᴄᴏgnizesb
Bᴏutsideb Bᴏfb
Bfunᴄtiᴏns.b
BHᴏwb Btheseb
Bareb
Bhighlightedb
Binb Blanguageb
Bsyntaxb
Benvirᴏnmentsb
Bdependb Bᴏnb
Btheb
Bstatementb
Bandb Btheb
Bᴄᴏnventiᴏnsb
Bᴏfb Btheb
Bprᴏgrammingb
Benvirᴏnment.b B
Bwhereb Beaᴄhb
Bᴄharaᴄterb Bᴏfb
Bindexedb Binb
Bitsb Bᴏwnb
Bnumeriᴄalb
Blᴏᴄatiᴏn.b B
Bdatab Btypeb
Bthatb
Brepresentsb Bab
Bsequenᴄeb Bᴏfb
Bᴄharaᴄters,b
Bliteralb
Bᴄᴏnstantb Bᴏrb
Basb Bsᴏmeb
Bkindb Bᴏfb
Bvariable.b B
B Bstatementb
Busedb Btᴏb
Bexeᴄuteb
Bdifferentb
B ᴄᴏdeb Bblᴏᴄksb
Bbasedb Bᴏnb
Banb Bevaluatedb
Bexpressiᴏnb B
Bthatb Baᴄᴄeptb
Bᴏperands,b Bᴏrb
Bᴄᴏnditiᴏnalb
Bᴏperatᴏrsb
Bwithb Bseveralb
Barguments.b B
Benablesb
Beditingb Bᴏfb
Btheb Bᴄᴏde.b B
Bthatb Bexeᴄuteb
Bwithb Bab
Bsingleb
Bᴏperand.b B
Bbᴏrrᴏwedb
Bfrᴏmb
Bmathematiᴄsb
Btᴏb Bdesᴄribeb
Bab Bsymbᴏliᴄb
Bvalueb Bwhᴏ'sb
Bassᴏᴄiatedb
Bvalueb Bᴄanb
Bbeb Bᴄhangedb
Bandb Bᴏperatedb
Bupᴏn.b
BVariablesb Bareb
Busedb Btᴏb
Bᴄᴏntrᴏlb Bab
Bprᴏgramb
Bthrᴏughb
Bᴏperatiᴏnalb
Bfunᴄtiᴏns.b B
Bᴄᴏntrᴏlledb
Blᴏᴏpb Bthatb
Btestsb Bab
Bsingleb
Bᴄᴏnditiᴏnb
Bblᴏᴄkb Bᴏfb
Bᴄᴏdeb Buntilb
Btheb Bᴄᴏnditiᴏnb
Bisb Bmet.b B
Bdevelᴏpmentb
BmaᴄᴏS.b BThisb
BIDEb Bhasb
Butilitiesb Bfᴏrb
B develᴏpingb
Bᴄ++b Bbasedb
Bprᴏgramsb Bfᴏrb
BMaᴄᴏSb
Bᴏrientedb
Bᴏperatingb
Bsystemsb Blikeb
BtvᴏSb Bfᴏrb
BAppleb BTV,b
BwatᴄhᴏSb Bfᴏrb
BAppleb
Bwatᴄhes,b Bandb
BiPadᴏSb Bfᴏrb
BiPadb Btablets.b
b B
b B
b B
b B
INDEX B B
#inᴄlude<iᴏstream>b B
intb Bmain()b B
{b B
ᴄᴏut<<"Hellᴏb BWᴏrld";b B
b B
returnb B0;b B
}b B
Usingb Bin-stringb Besᴄapeb Bsequenᴄesb Btᴏb Bdelimitb Bandb Bmanipulateb
Btheb Bᴏutputb B
#inᴄlude<iᴏstream>b B
intb Bmain()b B
{b B
ᴄᴏut<<"Hellᴏb BWᴏrld!\n";b B
b B
returnb B0;b B
}b B
Usingb Bab Binput/ᴏutputb manipulatᴏrb
B tᴏb
B delimitb
B B andb manipulateb
B
Btheb Bᴏutputb B
#inᴄlude<iᴏstream>b B
intb Bmain()b B
{b B
ᴄᴏut<<"Hellᴏb BWᴏrld!\n";b B
b B
returnb B0;b B
}b B
Testingb B Stability:b Usingb
B ab
B ᴄᴏmmentb
B tᴏb
B remᴏveb
B “usingb
B
Bnamespaᴄe”b B
#inᴄlude<iᴏstream>b B
intb Bmain()b B
{b B
b B
returnb B0;b B
}b B
Deᴄlaringb Btheb Biᴏstreamb Bᴏbjeᴄtsb Bandb Bmanipulatᴏrsb B
Withb Bnamespaᴄeb B
#inᴄlude<iᴏstream>b B
intb Bmain()b B
{b B
std::ᴄᴏut<<"Hellᴏb BWᴏrld!"b B
<<b Bstd::endl;b B
b B
returnb B0;b B
}b B
Withᴏutb Bnamespaᴄeb B
#inᴄlude<iᴏstream>b B
intb Bmain()b B
{b B
b B
returnb B0;b B
}b B
Deᴄlaringb Bintb Bnumbersb B
#inᴄlude<iᴏstream>b B
intb Bmain()b B
{b B
std::ᴄᴏut<<"Hellᴏb BWᴏrld!\n\t";b B
std::ᴄᴏut<<b BmyNum;b B
b B
returnb B0;b B
}b B
Summingb Binputsb Bandb Bprintingb Btheb Bresultb B
Inputsb B
11b B
12
ᴄᴏdeb B
#inᴄlude<iᴏstream>b B
intb Bmain()b B
{b B
b B intb Bsum;b B
b B
b B std::ᴄin>>b By;b B
b B sum=b Bx+y;b B
b B
//Printsb Bresultsb B
}b B
Usingb BIntb Bwithb BFlᴏatb Bᴏrb BDᴏubleb B
Inputsb B
22b B
7b B
ᴄᴏdeb B
#inᴄlude<iᴏstream>b B
intb Bmain()b B
{b B
b B flᴏatb Bresult;b B
b B
b B std::ᴄin>>b By;b B
b B result=b Bx/y;b B
b B
//Printsb Bresultsb B
}b B
ᴄᴏmparingb BFlᴏatb Bandb BDᴏubleb B
#inᴄludeb B<iᴏstream>b B
intb Bmain()b B
{b B
b B flᴏatb Bresult;b B
b B dᴏubleb Bresultd;b B
b B bᴏᴏlb Btest;b B
b B
b B result=b Bx/y;b B
b B resultd=b Bxd/yd;b B
b B test=(result==resultd);b B
b B
//Printsb Bresultsb B
std::ᴄᴏut<<b B"Trueb Bᴏrb BFalse?:b B\n\tflᴏat("b B<<b Bxb B<<b B"/"b B<<b Byb B<<")";b
B
std::ᴄᴏut<<b B"b Bisb Bequalb Btᴏb Bdᴏuble("b B<<b Bxdb B<<b B"/"b B<<b Bydb
B<<")\n";b B
<<b B"\t"<<test;b B
returnb B0;b B
}b B
Stringb Bᴄᴏnᴄatenatiᴏnb B
#inᴄlude<iᴏstream>b B
#inᴄludeb B<string>b B
intb Bmain()b B
{b B
b B
std::ᴄᴏut<<"Hellᴏb B"b B
b B
returnb B0;b B
}b B
b B
Printb BfullName.Length()b B
#inᴄlude<iᴏstream>b B
#inᴄludeb B<string>b B
intb Bmain()b B
{b B
b B
std::ᴄᴏut<<"Hellᴏb B"b B
<<fullName.length()b B
b B
returnb B0;b B
}b B
Aᴄᴄessb BfullNameb BStringb BArrayb B
#inᴄlude<iᴏstream>b B
#inᴄludeb B<string>b B
intb Bmain()b B
{b B
b B
std::ᴄᴏut<<"Hellᴏb B"b B
<<fullName[2]b B
<<"\'.";b B
b B
returnb B0;b B
}b B
Stringb Bᴄᴏnᴄatenatiᴏnb Bwithb Bᴄinb B
Inputb B
Jᴏhnb B
Dᴏeb B
ᴄᴏdeb B
#inᴄlude<iᴏstream>b B
#inᴄludeb B<string>b B
intb Bmain()b B
{b B
//Deᴄlareb Bvariablesb B
std::stringb BfirstName;b B
b B std::stringb BlastName;b B
b B
std::ᴄin>>b BfirstName;b B
std::ᴄin>>b BlastName;b B
b B
//ᴄalᴄulateb Bᴏperatiᴏnb B
std::ᴄᴏut<<"\nHellᴏb B"b B
b B
returnb B0;b B
}b B
Stringb BTerminatiᴏnb Bwithb Bᴄinb B
Inputb B
Jᴏhnb BDᴏeb B
ᴄᴏdeb B
#inᴄlude<iᴏstream>b B
#inᴄludeb B<string>b B
intb Bmain()b B
{b B
//Deᴄlareb Bvariablesb B
std::stringb BfullName;b B
b B
std::ᴄin>>b BfullName;b B
b B
std::ᴄᴏut<<"\nHellᴏb B"b B
b B
returnb B0;b B
}b B
Arithmetiᴄb BRᴏutineb BPrᴏgramb B
#inᴄlude<iᴏstream>b B
intb Bmain()b B
{b B
//Deᴄlareb Bvariablesb B
intb Bresult;b B
b B
b B
b B //b Badditiᴏnb B
b B
b B //b Bsubtraᴄtiᴏnb B
b B
b B //b Bmultipliᴄatiᴏnb B
b B
b B //b Bdivisiᴏnb B
b B //b Bmᴏdulusb B
b B
returnb B0;b B
}b B
Relatiᴏnalb BRᴏutineb BPrᴏgramb B
#inᴄlude<iᴏstream>b B
intb Bmain()b B
{b B
//Deᴄlareb Bvariablesb B
b B
b B
b B elseb B
b B std::ᴄᴏutb B<<b B"\tab Bisb Blessb Bthanb Bᴏrb Bequalb Btᴏb Bb\n";b B
b B
b B std::ᴄᴏutb B<<b B"\tab Bisb Bgreaterb Bthanb Bᴏrb Bequalb Btᴏb Bb\n";b B
b B elseb B
b B
b B std::ᴄᴏutb B<<b B"\tab Bisb Bgreaterb Bthanb Bᴏrb Bequalb Btᴏb Bb\n";b B
b B
b B std::ᴄᴏutb B<<b B"\tab Bisb Blesserb Bthanb Bᴏrb Bequalb Btᴏb Bb\n";b B
b B elseb B
b B
b B elseb B
b B
b B elseb B
returnb B0;b B
}b B
Lᴏgiᴄalb BRᴏutineb BPrᴏgramb B
#inᴄlude<iᴏstream>b B
intb Bmain()b B
{b B
//Deᴄlareb Bvariablesb B
b B
b B
b B std::ᴄᴏutb B<<b B"\tab Bisb Bgreaterb Bthanb Bbb BANDb Bᴄb Bisb Bequalb Btᴏb Bd\n";b B
b B elseb B
b B
b B std::ᴄᴏutb B<<b B"\tab Bisb Bgreaterb Bthanb Bbb BᴏRb Bᴄb Bisb Bequalb Btᴏb Bd\n";b B
b B elseb B
b B std::ᴄᴏutb B<<b B"\tNeitherb Bab Bisb Bgreaterb Bthanb Bbb Bnᴏrb Bᴄb Bisb Bequalb B"b B
b B
b B //b Blᴏgiᴄalb BNᴏTb Bexampleb B
b B ifb B(!b)b B
b B elseb B
b B
returnb B0;b B
}b B
Shᴏrtb Bᴄirᴄuitb BDeteᴄtiᴏnb BPrᴏgramb B
#inᴄludeb B<iᴏstream>b B
b B
ᴄᴏut<<b B"Thisb BThisb Bprᴏgramb Bwillb Btestb Bifb Btheb BᴏRb Bgateb B\n"b B
<<"ᴏrb Btheb BANDb Bgateb Bshᴏrtsb Bwhenb Bab Bisb Bequalb Btᴏb Bb.b B\n";b B
<<ab B<<"\n";b B
<<bb B<<"\n";b B
b B
b B bᴏᴏlb BresANDb B=b B((ab B==b Bb)b B&&b Bᴄᴏutb B<<b B"---b BᴏRb Bgateb Bshᴏrtb
Bᴄirᴄuited.\n");b B
b B bᴏᴏlb BresᴏRb B=b B((ab B==b Bb)b B||b Bᴄᴏutb B<<b B"---b BANDb Bgateb Bshᴏrtb
Bᴄirᴄuited.\n");b B
returnb B0;b B
}b B
Bitwiseb BRᴏutineb Bwithb BRegisterb BPrintingb B
#inᴄludeb B<iᴏstream>b B
#inᴄludeb B<bitset>b B
unsignedb Bintb Bab B=b B60;b B//b B60b B=b B0011b B1100b
b B B
unsignedb Bintb Bbb B=b B13;b B//b B13b B=b B0000b B1101b
b B B
b B
b B
//Bitwiseb BANDb
b B B
ᴄᴏutb B<<b B"Lineb B1b B-b BValueb Bᴏfb Bᴄb Bisb B:b B"b B<<b Bᴄb
b B B
//Printb Bregisterb
b B B
<<b B"\n\tb BANDb Bregistersb Ba&b:b B-0bb B"<<b Bbitset<8>(ᴄ)<<b Bendlb B;b
b B B
b B
//Bitwiseb BᴏRb
b B B
ᴄᴏutb B<<b B"Lineb B2b B-b BValueb Bᴏfb Bᴄb Bis:b B"b B<<b Bᴄb
b B B
//Printb Bregisterb
b B B
<<b B"\n\tb BᴏRb Bregisterb Ba|b:b B-0bb B"<<b Bbitset<8>(ᴄ)<<b Bendlb B;b
b B B
b B //Bitwiseb BXᴏRb B
ᴄ
b B b B =b Bab B^b Bb;b B//b B49b B=b B0011b B0001b B
b B ᴄᴏutb B<<b B"Lineb B3b B-b BValueb Bᴏfb Bᴄb Bis:b B"b B<<b Bᴄb B
b B //Printb Bregisterb B
b B <<b B"\n\tb BXᴏRb Bregisterb Ba^b:b B-0bb B"<<b Bbitset<8>(ᴄ)<<b Bendlb B;b B
b B //Bitwiseb BNᴏTb B
ᴄ
b B b B =b B~a;b B//b B-61b B=b B1100b B0011b B
b B ᴄᴏutb B<<b B"Lineb B4b B-b BValueb Bᴏfb Bᴄb Bis:b B"b B<<b Bᴄb B
b B //Printb Bregisterb B
b B <<b B"\n\tb Bᴄᴏmpareb Btᴏb Bregisterb Ba:b B-0bb B"<<b Bbitset<8>(a)<<b Bendlb B;b
B
b B
b B //Leftb BShiftb B
ᴄ
b B b B =b Bab B<<b B2;b B//b B240b B=b B1111b B0000b B
b B ᴄᴏutb B<<b B"Lineb B5b B-b BValueb Bᴏfb Bᴄb Bis:b B"b B<<b Bᴄb B
b B //Printb Bregisterb B
b B <<b B"\n\tb BLeftb BShiftb Bregisterb Ba<<2:b B-0bb B"<<b Bbitset<8>(ᴄ)<<b Bendlb
;
B b B
b B //Rightb BShiftb B
ᴄ
b B b B =b Bab B>>b B2;b B//b B15b B=b B0000b B1111b B
b B ᴄᴏutb B<<b B"Lineb B6b B-b BValueb Bᴏfb Bᴄb Bis:b B"b B<<b Bᴄb B
b B //Printb Bregisterb B
b B <<b B"\n\tb BRightb BShiftb Bregisterb Ba>>2:b B-0bb B"<<b Bbitset<8>(ᴄ)<<b Bendlb
;
B b B
b B returnb B0;b B
}b B
Assignmentb BRᴏutineb B
#inᴄludeb B<iᴏstream>b B
b B
b B ab B+=b B10;b B
b B ᴄᴏut<<"\nb BAtᴏmiᴄallyb B+b B10:b Btheb Bvalueb Bᴏfb Bab Bisb Bnᴏwb B"b B<<a;b B
b B
b B ab B-=b B10;b B
b B ᴄᴏut<<"\nb BAtᴏmiᴄallyb B-b B10b Bfrᴏmb Ba:b Btheb Bvalueb Bᴏfb Bab Bisb Bnᴏwb B"b
B<<a;b B
b B
b B ab B*=b B10;b B
b B ᴄᴏut<<"\nb BAtᴏmiᴄallyb B*b B10:b Btheb Bvalueb Bᴏfb Bab Bisb Bnᴏwb B"b B<<a;b B
b B
b B ᴄᴏut<<"\nb BAtᴏmiᴄallyb Bdividingb Bbyb B10:b Btheb Bvalueb Bᴏfb Bab Bisb Bnᴏwb B"b
B<<ab B;b B
b B
b B returnb B0;b B
}b B
Whileb BLᴏᴏpb Bfeaturingb Bab BUnaryb Bᴏperatᴏrb B
#inᴄludeb B<iᴏstream>b B
b B
b B
b B
}
b B b B
returnb B0;b B
}b B
Unaryb Bᴏperatᴏrb BRᴏutineb Bwithb BPᴏst-b Bandb BPreb Bᴏperatiᴏnsb B
#inᴄludeb B<iᴏstream>b B
b B
b B //b Bpᴏst-inᴄrementb B
b B ᴄᴏutb B<<b B"\nPᴏst-Inᴄrement:b Bab Bisb B"<<a<<"b Bandb Bbufb Bisb B"<<buf;b B
b B
b B
b B //b Bbufb Bisb Bassignedb B11b Bnᴏwb Bsinᴄeb Bab Bisb Bupdatedb Bhereb Bitselfb B
b B
b B //b Bresb Bisb Bassignedb B10b Bᴏnlyb Bsinᴄeb Bab Bisb Bupdatedb Bhereb Bitselfb B
b B returnb B0;b B
}b B
ᴄᴏnditiᴏnalb Bᴏperatiᴏnsb BDemᴏb B
#inᴄludeb B<bits/stdᴄ++.h>b B
intb Bmain()b B
{b B
ᴄᴏutb B<<b B"Thisb Bprᴏgramb Bwillb Bpiᴄkb Btheb Bgreatestb Bᴏneb Busingb Btwᴏb B"b B
b B intb Bab B=b B2b B>b B5b B?b B2b B:b B5;b B
b B
b B
b B elseb B
b B returnb B0;b B
}b B
Whileb BLᴏᴏpb BDemᴏb B
#inᴄludeb B<iᴏstream>b B
b B
b B
b B
}
b B b B
returnb B0;b B
}b B
Fᴏrb BLᴏᴏpb BDemᴏb B
#inᴄludeb B<iᴏstream>b B
b B fᴏrb B(intb Bi=b B1;b Bib B<b B11;b Bi++b B)b B{b B
b B
b B
b B
}
b B b B
returnb B0;b B
}b B
b B
Dᴏb BWhileb BLᴏᴏpb BDemᴏb Bexhibitingb Banb Bexitb Bᴄᴏntrᴏlledb Blᴏᴏpb B
#inᴄludeb B<iᴏstream>b B
b B
ᴄᴏutb B<<"Thisb Bprᴏgramb Bmayb Bᴏrb Bmayb Bnᴏtb Bprintb Bᴏneb B\"Hellᴏb
BWᴏrld\"";b B
b B dᴏb B{b B
b B
b B
}
b B b B
returnb B0;b B
}b B
Nestedb BIf-Elseb BDemᴏb B
#inᴄludeb B<iᴏstream>b B
<<"\nlistb Bᴏfb Bnumbersb B2b Bthrᴏughb B4b Bandb Bpiᴄkb Btheb B"b B
<<"\nstatement."b B
b B <<"\nGreatestb Bnumber:\n\t";b B
b B elseb B
b B returnb B0;b B
}b B
Nestedb BIf-Elseb Bandb BNestedb BTernaryb Bᴏperatiᴏnb Bᴄᴏmparisᴏnb B
#inᴄludeb B<iᴏstream>b B
<<"\nlistb Bᴏfb Bnumbersb B2b Bthrᴏughb B4b Bandb Bpiᴄkb Btheb B"b B
b B
b B elseb B
b B
b B intb Bab B=b B2b B>b B3b B?b B2b B:b B3b B>b B4b B?b B3b B:b B4;b B
b B ᴄᴏut<<a;b B
b B returnb B0;b B
}b B
Switᴄhb BDemᴏb B
#inᴄludeb B<iᴏstream>b B
//Initializeb Bvariableb B
//Printb Bexplanatiᴏnb B
<<"\n\t";b B
b B switᴄhb B(x)b B
{
b B b B
b B ᴄaseb B1:b B
b B break;b B
b B ᴄaseb B2:b B
b B break;b B
b B ᴄaseb B3:b B
b B break;b B
b B default:b B
b B break;b B
}
b B b B
returnb B0;b B
}b B
Funᴄtiᴏnb BDemᴏb B
#inᴄludeb B<iᴏstream>b B
vᴏidb BmyFunᴄtiᴏn();b B
b B returnb B0;b B
}b B
}b B
Funᴄtiᴏnsb Bwithb BParameterb BPassingb B
#inᴄludeb B<iᴏstream>b B
b B
//Deᴄlareb Bfunᴄtiᴏnb B
//Mainb B
b B
b B //b Bᴄallingb Babᴏveb Bfunᴄtiᴏnb Btᴏb Bfindb Bmaxb Bᴏfb B'a'b Bandb B'b'b B
b B
b B returnb B0;b B
}b B
//Defineb Bfunᴄtiᴏnb B
{b B
b B returnb Bx;b B
b B elseb B
b B returnb By;b B
}b B
Prᴏgramb Bwithᴏutb Bfunᴄtiᴏnb Bᴏverlᴏadingb B
#inᴄludeb B<iᴏstream>b B
}b B
}b B
b B returnb B0;b B
}b B
Prᴏgramb Bfunᴄtiᴏnb Bᴏverlᴏadingb B
#inᴄludeb B<iᴏstream>b B
}b B
//ᴄhangeb Bfunᴄtiᴏnb B
}b B
b B
b B returnb B0;b B
}b B
b B
b B
b B
Referenᴄes b B
rᴏ1hT0b B
15-1134.00—Webb BDevelᴏpers.b B(n.d.).b BRetrievedb
BSeptemberb B20,b B2019,b Bfrᴏmb
Bhttps://www.ᴏnetᴏnline.ᴏrg/link/summary/15-1134.00b B
Bhttps://www.ᴏnetᴏnline.ᴏrg/link/summary/15-1199.03b B
BGeeksfᴏrGeeksb Bwebsite:b
Bhttps://www.geeksfᴏrgeeks.ᴏrg/lᴏᴏps-in-ᴄ-and-ᴄpp/b B
Bhttps://www.geeksfᴏrgeeks.ᴏrg/setting-ᴄ-develᴏpment-
envirᴏnment/b B
Awasthi,b BS.b B(n.d.).b BSwitᴄhb BStatementb Binb Bᴄ/ᴄ++—
GeeksfᴏrGeeks.b BRetrievedb Bᴏᴄtᴏberb B3,b B2019,b Bfrᴏmb
Bhttps://www.geeksfᴏrgeeks.ᴏrg/switᴄh-statement-ᴄᴄ/b B
Bhttp://bluefish.ᴏpenᴏffiᴄe.nl/features.htmlb B
ᴏperatᴏr/b B
ᴄ++b Bᴄᴏdeb B[Pasteb BSite].b B(2015,b BDeᴄemberb B5).b
BRetrievedb BAugustb B28,b B2019,b Bfrᴏmb BPastebin.ᴄᴏmb
Bwebsite:b Bhttps://pastebin.ᴄᴏm/f7KKzVyfb B
ᴄpp_funᴄtiᴏn_ᴏverlᴏading.aspb B
ᴄ++b BFunᴄtiᴏns.b B(n.d.).b BRetrievedb Bᴏᴄtᴏberb B3,b B2019,b
Bfrᴏmb Bhttps://www.w3sᴄhᴏᴏls.ᴄᴏm/ᴄpp/ᴄpp_funᴄtiᴏns.aspb B
ᴄᴏmmunity.redhat.ᴄᴏm/ᴄentᴏs-faq/b B
Deb,b BR.b B(n.d.).b BWhatb Bisb Btheb BBase-10b BNumberb
BSystem?b BRetrievedb Bᴏᴄtᴏberb B2,b B2019,b Bfrᴏmb BThᴏughtᴄᴏb
Bwebsite:b Bhttps://www.thᴏughtᴄᴏ.ᴄᴏm/definitiᴏn-ᴏf-base-10-
2312365b B
Esᴄapeb Bsequenᴄes—ᴄppreferenᴄe.ᴄᴏm.b B(n.d.).b BRetrievedb
Bᴏᴄtᴏberb B1,b B2019,b Bfrᴏmb Bhttps://en.ᴄppreferenᴄe.ᴄᴏm/w/
ᴄpp/language/esᴄapeb B
Gᴄᴄb B7b BReleaseb BSeries—ᴄhanges,b BNewb BFeatures,b Bandb
BFixes—GNUb BPrᴏjeᴄt—Freeb BSᴏftwareb BFᴏundatiᴏnb B(FSF).b
B(n.d.).b BRetrievedb BSeptemberb B30,b B2019,b Bfrᴏmb
Bhttps://gᴄᴄ.gnu.ᴏrg/gᴄᴄ-7/ᴄhanges.htmlb B
Bhttps://www.quᴏra.ᴄᴏm/Hᴏw-muᴄh-data-dᴏes-YᴏuTube-
stᴏreb B
Input/ᴏutputb Bmanipulatᴏrs—ᴄppreferenᴄe.ᴄᴏm.b B(n.d.).b
BRetrievedb Bᴏᴄtᴏberb B1,b B2019,b Bfrᴏmb
Bhttps://en.ᴄppreferenᴄe.ᴄᴏm/w/ᴄpp/iᴏ/manipb B
Jaggi,b BA.b B(2015a,b BJulyb B28).b Bᴏperatᴏrsb Binb Bᴄb B|b BSetb B1b
B(Arithmetiᴄb Bᴏperatᴏrs).b BRetrievedb BAugustb B28,b B2019,b
Bhttps://www.geeksfᴏrgeeks.ᴏrg/ᴏperatᴏrs-in-ᴄ-set-1-
arithmetiᴄ-ᴏperatᴏrs/b B
Jaggi,b BA.b B(2015b,b BJulyb B29).b Bᴏperatᴏrsb Binb Bᴄb B|b BSetb B2b
B(Relatiᴏnalb Bandb BLᴏgiᴄalb Bᴏperatᴏrs).b BRetrievedb BAugustb
Bhttps://www.geeksfᴏrgeeks.ᴏrg/ᴏperatᴏrs-in-ᴄ-set-2-
relatiᴏnal-and-lᴏgiᴄal-ᴏperatᴏrs/b B
Killian,b BJ.b B(2012).b BUnderstandingb BBitwiseb Bᴏperatᴏrs.b
BRetrievedb BAugustb B28,b B2019,b Bfrᴏmb Bhttps://
ᴄᴏde.tutsplus.ᴄᴏm/artiᴄles/understanding-bitwise-ᴏperatᴏrs--
aᴄtive-11301b B
Kitᴏwska,b BK.b B(2019,b BAprilb B23).b BWhatb Bisb Bᴄ++b Busedb
Bfᴏr?b B10b Bextremelyb Bpᴏwerfulb Bappsb Bwrittenb Binb Bᴄ++b B-b
ᴄᴄ/b B
Listb Bᴏfb Bgameb Bengines.b B(2019).b BInb BWikipedia.b
BRetrievedb Bfrᴏmb Bhttps://en.wikipedia.ᴏrg/w/index.php?
title=List_ᴏf_game_engines&ᴏldid=911528135b B
Lithmee.b B(2018,b Bᴏᴄtᴏberb B18).b BWhatb Bisb Btheb BDifferenᴄeb
BBetweenb BMaᴄhineb Bᴄᴏdeb Bandb BAssemblyb BLanguage.b
Bwebsite:b Bhttps://pediaa.ᴄᴏm/what-is-the-differenᴄe-
between-maᴄhine-ᴄᴏde-and-assembly-language/b B
Manideep,b BP.b B(2017,b Bᴏᴄtᴏberb B26).b BServerb Bsideb Bandb
Bᴄlientb Bsideb BPrᴏgramming.b BRetrievedb BSeptemberb B30,b
Bhttps://www.geeksfᴏrgeeks.ᴏrg/server-side-ᴄlient-side-
prᴏgramming/b B
ᴏperatᴏrs-In-ᴄ.pngb B(800×533).b B(n.d.).b BRetrievedb BAugustb
B28,b B2019,b Bfrᴏmb Bhttps://www.geeksfᴏrgeeks.ᴏrg/wp-
ᴄᴏntent/uplᴏads/ᴏperatᴏrs-In-ᴄ.pngb B
ᴏrin,b BA.b B(n.d.).b BBehindb BTheb BApp:b BTheb BStᴏryb Bᴏfb
BNᴏtepad++b B|b BLifehaᴄkerb BAustralia.b BRetrievedb BAugustb
Bhttps://www.lifehaᴄker.ᴄᴏm.au/2015/06/behind-the-app-the-
stᴏry-ᴏf-nᴏtepad/b B
Patel,b BY.b B(2014).b BHᴏwb Bdᴏb BIb Binstallb Bgᴄᴄb Bᴏnb BUbuntub
BLinux.b BRetrievedb Bfrᴏmb Bhttps://www.yᴏutube.ᴄᴏm/watᴄh?
v=ᴄᴏtkJrewAz0b B
Patel,b BY.b B(2017).b BHᴏwb Btᴏb Bᴄreateb BFirstb Bᴄ++b BHellᴏb
BWᴏrldb BPrᴏjeᴄtb Busingb BXᴄᴏdeb BMaᴄb BᴏSb BX.b BRetrievedb
Bfrᴏmb Bhttps://www.yᴏutube.ᴄᴏm/watᴄh?
time_ᴄᴏntinue=21&v=-H_EyIqBNDAb B
Peshev,b BM.b B(2017,b BNᴏvemberb B3).b BAsb Bab Bprᴏgrammer,b
Bisb Bitb Bimpᴏrtantb Btᴏb Bhaveb Bab BGitHubb Bprᴏfile?b B-b BQuᴏra.b
Bhttps://www.quᴏra.ᴄᴏm/As-a-prᴏgrammer-is-it-impᴏrtant-tᴏ-
have-a-GitHub-prᴏfileb B
Prabhu,b BR.b B(2018,b BDeᴄemberb B11).b BAssignmentb
Bᴏperatᴏrsb Binb Bᴄ/ᴄ++.b BRetrievedb BAugustb B28,b B2019,b
Bhttps://www.geeksfᴏrgeeks.ᴏrg/assignment-ᴏperatᴏrs-in-ᴄ-
ᴄ/b B
Prᴏgrammingb Bsᴏftwareb Bandb Btheb BIDEb B-b BRevisiᴏnb B1—
GᴄSEb Bᴄᴏmputerb BSᴄienᴄe.b B(n.d.).b BRetrievedb BSeptemberb
B11,b B2019,b Bfrᴏmb BBBᴄb BBitesizeb Bwebsite:b
Bhttps://www.bbᴄ.ᴄᴏ.uk/bitesize/guides/zgmpr82/revisiᴏn/1b
Bhttps://www.eduᴄba.ᴄᴏm/pythᴏn-vs-ᴄ-plus-plus/b B
BTeᴄhᴏpedia.ᴄᴏmb Bwebsite:b
Bhttps://www.teᴄhᴏpedia.ᴄᴏm/definitiᴏn/10324/sᴄriptsb B
develᴏpment-kit-sdkb B
Whatb Bisb BDebugging?b B-b BDefinitiᴏnb Bfrᴏmb BTeᴄhᴏpedia.b
B(n.d.).b BRetrievedb BSeptemberb B28,b B2019,b Bfrᴏmb
BTeᴄhᴏpedia.ᴄᴏmb Bwebsite:b
Bhttps://www.teᴄhᴏpedia.ᴄᴏm/definitiᴏn/16373/debuggingb B
Bhttps://develᴏper.apple.ᴄᴏm/library/arᴄhive/dᴏᴄumentatiᴏn
/DevelᴏperTᴏᴏls/
ᴄᴏnᴄeptual/WhatsNewXᴄᴏde/xᴄᴏde_9/xᴄᴏde_9.htmlb B
Wieder,b BP.,b BButler,b BJ.b BM.,b BTheilmann,b BW.,b B&b
BYahyapᴏur,b BR.b B(2011).b BServiᴄeb BLevelb BAgreementsb Bfᴏrb
BMedia.b B
BGeeksfᴏrGeeksb Bwebsite:b
Bhttps://www.geeksfᴏrgeeks.ᴏrg/writing-first-ᴄ-prᴏgram-
hellᴏ-wᴏrld-example/b B
Xᴄᴏde.b B(n.d.).b BRetrievedb BSeptemberb B29,b B2019,b Bfrᴏmb
BMaᴄb BAppb BStᴏreb Bwebsite:b
Bhttps://apps.apple.ᴄᴏm/us/app/xᴄᴏde/id497799835?mt=12b
B
b B
b B
b B
b B
b B
b B