0% found this document useful (0 votes)
9 views48 pages

02 Lecture

The document introduces programming languages, explaining their role in instructing computers to perform tasks and computations. It covers basic concepts such as variables, data types, and type casting in C++, along with the process of compiling and executing programs. Additionally, it provides a simple example of coding a program titled 'Namaste Bharat'.
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
0% found this document useful (0 votes)
9 views48 pages

02 Lecture

The document introduces programming languages, explaining their role in instructing computers to perform tasks and computations. It covers basic concepts such as variables, data types, and type casting in C++, along with the process of compiling and executing programs. Additionally, it provides a simple example of coding a program titled 'Namaste Bharat'.
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
You are on page 1/ 48
) ho Create Your First Program & a lot more Reece ee eee ead en your First Program Instructor: Love Babbar Programming atl halal a Mac) rn a2 + A Language using which, we can instruct the computer to carry out real life tasks and computations is called a programming language. It acts as a language in which we could easily express our thoughts to the machine. Like natural languages, programming language has a fixed set of rules according to which programs could LS written in it. These programs are then converted into a language which maehines can understand. This task is carried out by a special software Say compiler/Interpreter|—> a Once a program is compiled and linked, its executable is created and the computer can run our program now. Every language has its ow! . A = forever 1 elma cele) “ ic ecco ewe rs Ue se) ere Le ay , - 7 na F Zz a iB ' 6 y nd ree € ' a Q = (CrT4 ir 1" IDE: 4G Code Edbv (O33 rr a) i Code Brug PNA es Dao Lb BeOS Let’s Code your 1st Program “Namaste Bharat” Kross, aad , bis roe a i re, i 2 oa re ao © ca onan aad na a ovens ea eer mice raujcoul fee aero A aoa Ce Se cay eee > Pal ran ns vi PCC! res cout << 2 (Cee) Ceara awd re a Taking Input in C+ SKiP Datatypes & Variables A variable in C is a memory location associated with some name in order to store some form of data and retrieve it when Pre ee tet tr ens C++ Datatypes | ee or oa Me, i DataTypes: (et = ae) Bye iy a Say (ACN : a tats Sa Baad cn ero a ra “ yee) eas aaa pee Sale ees SG ees SE cr ce UME GLT in: fa uae or te ae La ” (oe cen a ca 7 im A Sy Oe ED 2 ot Ze Or a ee li bar 2 =) Wid ya od D510) oo a nny) aaa ( — te ie 1e a ae coe toe WO) & —=> loor a TD ora Variable re) eral [Explore] Rulea hn Pere ae] | How data is stored ? ee ry isha aoe esa é f\ $ a OU Se DUeo 7a ea eer a re Pere ae ee rae eT a Cee Cr i pad Ex ie wt haa j eee een ei CS ead ( 2 om! ar) a = Mal) ee oe th 3 1p yy) 000 j rear OME ay Orne Rees Ce) ee orm ned OPS aie ae Cron ne — Cr) Pes uy - = - = 11 Ole ieee kee) CLE Exp ioe ee an ae res 31 | res | aad wg ia Sw a aa aa recye is spect na a aa nates a a ar oa 8 i Signed vs Unsigned data: i i aaa aan ee Bb _ cy a sa (ea aa By reat Co rebinshon 7 eee yaa a, a as va o\. Ere Ata o 5 a Ws ewes anes = Peete (-2" = 2" -1) cs vee aro TypeCasting Implicit vs Explicit Type casting refers to the conversion of one data type to another ina program. Typecasting can be done in two ways: automatically by the compiler and manually by the programmer or user. Type Casting is also known as Type Conversion. Operators: aye Paola ar as oy 7 3s =) Gab —— oa e eC pay = cone is : ( [' ar hind Lape inewa rita pee \Ws aerel: Rk -ywed Ky, OChU ae (ond) enn (G | O |—s6 f oe im een i NoyrreA > Phe ay Ds Sees > Ayers olla TF OR 8 bebe > Need ET) oe Se ee year we . =) ge a ae ee ; a oes rs Hye a te) 2-2 @ rs oman. Cae) ooo ere Conditionals Loops: nye ane a Lolliston ; | ne nler roel) ae Cob are aad Spel —_ ABCD =

You might also like