Address
:
[go:
up one dir
,
main page
]
Include Form
Remove Scripts
Session Cookies
Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
45 views
13 pages
Bhavya 28th January 2023 Notes
Uploaded by
Sisir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save Bhavya 28th January 2023 Notes For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
45 views
13 pages
Bhavya 28th January 2023 Notes
Uploaded by
Sisir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save Bhavya 28th January 2023 Notes For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 13
Search
Fullscreen
LV \\\\ classmate. if @>b) & CA>C) » byint a else 4. (b> a) & Cb>c) 5 print b lelse joint c 28/01/2023 | Sa AM) shh ge Language in which we ane giving i instruchons to Oux computer: Also note that every programming wr ave Its Own Compr ler /ircterp rete Ex4 C++, C, Java, Python wv programming Ramuage Compilation process. - We wild be writing the code in the fugh ___ Devel Language bs Computer wont be cable to undenstand ib & we need a translator & hex compiler wi2t ack as a_trans lator: Comprlex wil? convert the high Level Janguage te- machine _undexstandable language: Machune ——— Sanguage means binary language pre Os & Is. Compile A Compilex £abes a progaan.as 'whdle— Ond genenats, inten mediate maachine cod es—Thi = trang lates the entire “ounce code in_a singe yun: (Lr ONY. intermedrat machine code: iG IDE The fuse form is inte yaked Develobmer Tool on which Wwe can. write the co te St f the environmenk ,.also—provides — ae Maou, feakuus & hence iE increases SU vuaiicu wiur vamchest, 7 | Ex Codeblocks 5 VS code, Sublime, Xcode == Writing oux fix £ progam _ Scope sh, nt mam () _ fot mand) £ 73 _ 1s_iS_similax to stat combonent we = have done fn the flowchart Compiler wile soxch for this & frem fuse the exe St tha -byogsam will Stant- 2 cout << “Namaste Bhanak” 5 This is used to byint on the console /soreen bude Ve Gives ON Cor th otis the use of undeclared ident fren - | This means that compiler _ does not Rnouw What is Couk: | Be fove we use. COUX 5 We! Reed tofnbort its code ok wecan use This £ r ( 3) Fle! ha. tea suing. (mplementahien gh Heincluds
. cout <= us quot the-cods of fmblementahion ef, We use std is couk << “Hello”? 5 =r 4 This fs a Damesboce lamespace This ($ basically scone £ uk with be deth nett and._imb lementaben -— ent na, mesbacts-———— Stan, i —— bhence we wrote ¢ i cette _tmnplementab n cs Standond homes A namesbou, a ovaiicu wittt Valliclassmate. Namespace iS oO veqion where thr scope eb identfiexs have been defined For artes scope_e}, cout IS defined In std Namespace _ But this 1's a Cumbexsome task ef writing Std $3 cout again again & hence we can _ desine [declase which namespace te-use ysing nameShace std i Novus we can 0 fun chonabity et firint si} ly ay couk << coukK<) “He mG) Tesrntnatuy L — For prnting ‘> Past of Syrnbols GAs U Standard oukp “Hi” 3 Heiis a vent (Siving) Written ins dowste Tnyeted. Commas 1 Couk << 25 7 Theme wil? be printing : Couk << "2" > YT 2 on tha scneer . ouk << 6275 Also note that << IS Rnown as insertion j LObex ator « — Stng®s frverked commas means chanackes + Double fryvented commas means String {Next Line HO go te the next Line we use Reywor 1 vvuaiicu wiul vamclassmate, Date couki<< “Hee i Hi Hello couk << SHedlo’> kouk << “He” <
He = Cour << “Hello” 5 J Helis 7 Note! Thens (6 one move way to add news Aine be new dine chanacten VR couk << He Nn” > CHE couk << “Hello” 5 J Helde- : . Log fcobby thine i's no difference blue endl & — me Taking Input From user Fox_pxinhng we use cout buk for taking — Input from ‘the Usex » Cin is used But for taking inpuk swe have ‘te store ikin x Imempxy & that memony Space is given a — name Int a 5 > Taking integer memory shace 4 f cin >ras hame a- qe bs To toke input & send it ts memory Sboce a Note “Hcamblels giving Input swe need GLE lenten Rey. a Comments (n C++ _— These Sines at \Gnoved. by compiler 2p — vuaiicu wiur vamtb _exeuiked We fave te add thin te make Une comment W This Q_comment Comments can be useh ts make notes. Alse there IS a Shortut te make a (ine commentis _| chrg + / Vaswable Vouables can _bede fined ax named rnemory § ocahon se that we can refer It fn fukure- Int a=75 ——> [7 | cout <
| funehon, > O/b Tekuin tybe | int main 0) $ PZBy L Le Size Range Chan ~128-127 hort - 32168 - 32167 _—— int Ql 8 - 24.7 —— Long. T8l-- B-Q14.7 HF. 8- 92a..7 iene dong Long If loak 00 |-f [go |p |p |p | — 3-4 e+/-38 double I-7 e@ +/- 308 32 64 bit CPU + canbeWffenent for bre CPU Int daka tube a £ St memory - yobe 4x8=32 bis Boies Bbrts 8 ets Sets | (byte byte Lbyte | byte thie ase 2 I hence 23? ans bo one pee i itlest—ott chost data. Chax ch = a> S | byte _ 8 bts ¥ _l | byte aé Sea ep tessible as cack bis Lave either 6 ov Mc feted a begg — 2xXQ -- x2 =Q8 CB times _— _ = ovaiicu witth Gariclassmate. Now qaushon comen that whether characte Q_IS Steved oy not. But a numbex is Stoved Instead 2 ale the Characters axe mapped te ASCIT vale fe a numeuc value £ thi humestic value is converted inte Os & Is & then Stored - QA 91- converted to os 2 IS Qnd-then_ Stored in memory boolean data tube Can have only Qvalus be _elther truror Ise ; aka type = a bool flag = trusa5 bood Flag = false! couk << Flag 5 > Gives o/p. 4. couk<< Flag 34 jo truz — 1 2 Simflax false + O AX The Sbace taken by boolean is [byte but _ it Is suffcienk to vebyvesent fe tn tf bit but shoe | byte 1's taken because moltst /minimum memory that can be Used. Is 1 byte. Thee is memory wastage alse. _ [aay te 4 is tb byte. floak & double data tybe There ons used for vebverenting dectmal AuUmbers + vuaimicu wiur vam| Float f= 1-25 a i double f = 1-25 a Tl But which one to use? Double fs more _ i et & Float takes up de Memory Skace - The one taking move _ 5 can_ye| (9g es Mutmber + 2 bo ase) Quap As we Rnous that’ as6 Characters cam onks ; be stored in chan but what ifwedo chan ch =2563 7 is 1S bastcalty the overf lous condvhon 2 2HnOy Comes 1-e Ovenflou Mn convenson From int £0 Chax changes vedue from "256? t@ “\ooo0”’ = Also we can say fort 8 bits wrd2% be cobred- wi Deuved Lean. Ex Ayrays» pointer ete. oto. tubes Primitive oka type ant ured fe malee ‘ ai) Vawwable naming convenhona &_undixscoves Names noust begin with fetter or underscore — Names are Care sengihve Names can not have sbaca £ ho Special charat then thon. Undinecore canbe sured sizeeh QO sea This vetwins The Sige of data. tup en bytes —~ ovaiicu wit vamsizeof Cint)s > 4 2 th bytes Sizeof Cchan) j 3 2 data. w Posihve numbers iin ar ='515 (fo) Sic) Tiel] B2bits chan ch =a’ 5 > Just convert the ASCIE Vodur te brassy & Then Ht wil be stra te thok Of Prtegen. i | - - SB bits It 's important tounote that first bit from Lebt wil be O I$ +ve number 1: those - St wr 00 be 2 1 —ve number is There - i Negative Mmumbes : Wit® be stoved 1 as Compliment - Woy to find ans Complement % Is complement + | Firp Oo te 2 £ | 459 0 Ja cooooll!| § Tut tor undwutandira 8 Ii itlooo = Is complement bits. i 1llooe I It] loot Sas comblement a4 +l = lo * binowus \ VUQGINITU WILT vancliseug (ht a =-5 Step! Tgnove Negative Ss gn : a 5 te [Stepa Find binary equivalent ef 5 Coo... Olol Steb 3] Find 2 Complement Lhi-- Loto lold sas complement This wasp =Vve Numben Is stored fa he Memory u ~vend. <—QIt_- How te read fram memory, Just find 2 Comblement 006--~oloo \ SIO CMETOR onl 7S 7 Buk we have abme See fivet bre tn mem checahbatee se fase — (E'S a negative ‘umben ene Ans > -5 = Tntenreshn: pal Tel Teak ae Hous we gek fe Baas ahctna ate Ha fo seod_ ot tha bm oy Yt ve \ vvuaiicu wiur vamclassmate Date. This is known by the data type ured: Staned v unsigned. hota type nest ci tore ale 2 the Numbers whether [tve »-ve Or O Sn we store th egative voluios For e xamble =Lunsigned Inké_ wr2l Rave rings ei 0 te “ase =| We By deSautt » data type wilt be signed - Range st signed int wil? be -2%! to a8! =i. | Q 3? Divide tate 2 he Qi aal 3 Thats why taking 23! in the Yange - Beneuc for nm bits Signed 3 -ar! te ar! -1 Unstgned © te Qrh-) [Ty pecashng Convech ng ane ty af obeys tant — data ty be Cha ch = 97 5 7 Lnteger te chaxackr. COUEKOh yy at ive Q An oukpuk = 6b) $4 Chonacker th Tnkegeu Int pum Couk << num 57 five 98 QA oukpur ———svanrret wittuvamImp treit. Type OIE e Ut riwtnee nine See ny This is outro matic type casting. The above. examples Were sf [mpliert type conversio fox tubecashng. a leak A= (Float) 2 3 a 2 heudaka type wit be mMmenitioned« _ ( Opexators in C++ Axith mehc operators mC) toss Rs 1, th ane ancth metic openator. — [Foe=is b=3 (i cCouk << G@/b) <
The giver olb a. a Note 4 fine = fnt fleat = Float » clouble = douse — Int tint Pre Int = float , Floak = fioab Float Flook 2) Relational Obenator: 29<, >=5
You might also like
ugBASIC - User Manual
PDF
No ratings yet
ugBASIC - User Manual
952 pages
Object Oriented Programming C++ Solved Manual
PDF
No ratings yet
Object Oriented Programming C++ Solved Manual
161 pages
CP Unit-1 Notes
PDF
No ratings yet
CP Unit-1 Notes
20 pages
Unit1 CIntro
PDF
No ratings yet
Unit1 CIntro
51 pages
Microcontroller A1
PDF
No ratings yet
Microcontroller A1
10 pages
Unit 2 - Basics of Programming
PDF
No ratings yet
Unit 2 - Basics of Programming
12 pages
MC Assignment
PDF
No ratings yet
MC Assignment
18 pages
Computer Programing Lab PDF
PDF
No ratings yet
Computer Programing Lab PDF
105 pages
CP Assignment 1..
PDF
No ratings yet
CP Assignment 1..
15 pages
Lecture 1-Introduction To C
PDF
No ratings yet
Lecture 1-Introduction To C
7 pages
Gtoplemeo C Unctionpeonte: Piatt C PM Is D
PDF
No ratings yet
Gtoplemeo C Unctionpeonte: Piatt C PM Is D
25 pages
Bhavya C++ Week-1 Quiz Solutions
PDF
No ratings yet
Bhavya C++ Week-1 Quiz Solutions
11 pages
Unit 1
PDF
No ratings yet
Unit 1
49 pages
PPS Record 27-35 Programs - 240113 - 141016
PDF
No ratings yet
PPS Record 27-35 Programs - 240113 - 141016
28 pages
C Language (Unit 2 (Part 1) )
PDF
No ratings yet
C Language (Unit 2 (Part 1) )
20 pages
Lab Report 2
PDF
No ratings yet
Lab Report 2
15 pages
Bhavya C++ Week-3 Quiz Solutions
PDF
No ratings yet
Bhavya C++ Week-3 Quiz Solutions
6 pages
Unit - 1
PDF
No ratings yet
Unit - 1
58 pages
CIS109 Introduction To Java and Object Oriented Programming (Volume 2)
PDF
No ratings yet
CIS109 Introduction To Java and Object Oriented Programming (Volume 2)
127 pages
01 May 2024 Notes
PDF
No ratings yet
01 May 2024 Notes
5 pages
CP Important Question Bank Which Can Come
PDF
No ratings yet
CP Important Question Bank Which Can Come
32 pages
Homework Solutions 1st February 2023
PDF
No ratings yet
Homework Solutions 1st February 2023
3 pages
OOP Prelim Paper Solution
PDF
No ratings yet
OOP Prelim Paper Solution
27 pages
New ?
PDF
No ratings yet
New ?
25 pages
The Rook's Guide To C++
PDF
No ratings yet
The Rook's Guide To C++
161 pages
Introduction To C Language
PDF
No ratings yet
Introduction To C Language
47 pages
C Programming and Data Structures Notes Sample Compressed
PDF
No ratings yet
C Programming and Data Structures Notes Sample Compressed
8 pages
Imgtopdf 2909221401056
PDF
No ratings yet
Imgtopdf 2909221401056
39 pages
Pps Module 1
PDF
No ratings yet
Pps Module 1
20 pages
Programming For Problem Solving Using C and C RBU
PDF
No ratings yet
Programming For Problem Solving Using C and C RBU
69 pages
Backtracking - ClassIV - Notes - 25th March 2023
PDF
No ratings yet
Backtracking - ClassIV - Notes - 25th March 2023
5 pages
Oodp Unit 1
PDF
No ratings yet
Oodp Unit 1
38 pages
C Basic Data Types
PDF
No ratings yet
C Basic Data Types
16 pages
Unit-1 PSTC
PDF
No ratings yet
Unit-1 PSTC
25 pages
Lab Report 3-4
PDF
No ratings yet
Lab Report 3-4
47 pages
Bhavya 1st - February - 2023 Notes (Revision Important Points Only)
PDF
No ratings yet
Bhavya 1st - February - 2023 Notes (Revision Important Points Only)
3 pages
C Language 1
PDF
No ratings yet
C Language 1
15 pages
PPS EXP. NO.2 and 1
PDF
No ratings yet
PPS EXP. NO.2 and 1
8 pages
Cse 411 TT 12
PDF
No ratings yet
Cse 411 TT 12
9 pages
CCP Set 3
PDF
No ratings yet
CCP Set 3
21 pages
C Unit 1 Notes
PDF
No ratings yet
C Unit 1 Notes
60 pages
Class +1 (CH - 4 & 5)
PDF
No ratings yet
Class +1 (CH - 4 & 5)
11 pages
Arrays - Class 1
PDF
No ratings yet
Arrays - Class 1
13 pages
DP - ClassII - Notes - 7th June 2023
PDF
No ratings yet
DP - ClassII - Notes - 7th June 2023
11 pages
C Programming
PDF
No ratings yet
C Programming
42 pages
Master C++ 11
PDF
No ratings yet
Master C++ 11
4 pages
OOPS
PDF
No ratings yet
OOPS
53 pages
CPP Notes - 01
PDF
No ratings yet
CPP Notes - 01
30 pages
Programing in C - A Study Material
PDF
No ratings yet
Programing in C - A Study Material
90 pages
02-CP Lab Manual PDF
PDF
No ratings yet
02-CP Lab Manual PDF
71 pages
Course Notes
PDF
No ratings yet
Course Notes
74 pages
2Nd Chapt Fybcs - 10 - 07 - 2022 New Doc 10-07-2022 14.06
PDF
No ratings yet
2Nd Chapt Fybcs - 10 - 07 - 2022 New Doc 10-07-2022 14.06
11 pages
Byts Week - 4
PDF
No ratings yet
Byts Week - 4
18 pages
BCSL 032
PDF
No ratings yet
BCSL 032
16 pages
Unit 1
PDF
No ratings yet
Unit 1
18 pages
CSC209
PDF
No ratings yet
CSC209
72 pages
C
PDF
No ratings yet
C
25 pages
CPS125 - Course Guide
PDF
No ratings yet
CPS125 - Course Guide
60 pages
C-Programming ShortNotes
PDF
No ratings yet
C-Programming ShortNotes
7 pages
DP - ClassI - Notes - 3rd June 2023
PDF
No ratings yet
DP - ClassI - Notes - 3rd June 2023
7 pages
C&Matlab Primer
PDF
No ratings yet
C&Matlab Primer
412 pages
Research Work
PDF
No ratings yet
Research Work
9 pages
C Programming Notes Part 1
PDF
No ratings yet
C Programming Notes Part 1
24 pages
C Programming and Data Structures Notes Sample Compressed
PDF
No ratings yet
C Programming and Data Structures Notes Sample Compressed
8 pages